home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / ds40bpds.zip / DS40.DOC < prev    next >
Text File  |  1992-06-03  |  149KB  |  3,527 lines

  1.  
  2.  
  3.                          Door Source - Version 4.0B
  4.                             QBX/PDS 7.x VERSION
  5.                            Released May 16,1992
  6.                    Copyrighted 1989,1989,1990,1991,1992
  7.                               By Todd Miller
  8.  
  9.                               Support Boards:
  10.            PC-Technologies (Sysop Todd Miller)  (919) 294-1770
  11.           
  12.  
  13.                                Mail Support:
  14.                             PC-Technologies
  15.                             PO Box 77103
  16.                             Greensboro, NC 27417-7103
  17.  
  18.   Door Source 4.0B
  19.   Programmer's Manual - Page 2
  20.                          Table of Contents
  21.  
  22.   Disclaimer and Credits.............................................4
  23.  
  24.   Introduction.......................................................5
  25.  
  26.   The deal on NO registration........................................6
  27.  
  28.   Some Never Nevers..................................................7
  29.  
  30.   Quick Start........................................................8
  31.      Loading Door Source.............................................8
  32.      First few lines.................................................8
  33.  
  34.   Getting Started....................................................10
  35.  
  36.   Command line options...............................................
  37.  
  38.   Door Writing Techniques............................................16
  39.      Gathering data from the user....................................19
  40.      Making friendly menus...........................................20
  41.  
  42.   Finishing your door................................................23
  43.  
  44.   Getting more out of Door Source....................................25
  45.      The definable page sound........................................25
  46.      Two fancier input prompts.......................................26
  47.  
  48.  Advanced Techniques................................................29
  49.      Extra status line...............................................29
  50.      Writing your own I/O routines...................................30
  51.  
  52.   How a door works...................................................32
  53.  
  54.   Converting from 3.2 or before......................................33
  55.  
  56.   Summary of new features............................................34
  57.  
  58.   Appendix A - CALL Syntax...........................................35
  59.  
  60.   Appendix B - Optimizing your door..................................36
  61.  
  62.   Appendix C - Common Questions......................................37
  63.  
  64.   Appendix D - Variable Reference....................................38
  65.  
  66.   Appendix E - Script Commands.......................................41
  67.  
  68.   Appendix F - Command Reference.....................................53
  69.      AdjustTimeLimit.................................................54         
  70.      AllTrun$........................................................55
  71.      ANSIMusic.......................................................56      BackSpace.......................................................57
  72.      BackSpaceOver...................................................58
  73.      BackSpaceToCol..................................................59
  74.      BeepSpeaker.....................................................60
  75.      BlockSend.......................................................61
  76.      Center..........................................................62
  77.      ChangeCTS.......................................................63
  78.      ChangeDTR.......................................................64
  79.      ChangeRTS.......................................................65
  80.      CheckCarrier....................................................66
  81.      CheckTimeLeft...................................................67
  82.      ClrScrn.........................................................68
  83.      ColorEasy.......................................................69
  84.      CommInkey$......................................................70
  85.      CommKeyInkey$...................................................71
  86.      CopyAFile.......................................................72
  87.      DayOfWeek.......................................................73
  88.      DoorBusy........................................................74
  89.      EntryIncomm.....................................................75
  90.      ExtendedCode....................................................76
  91.      ExitDoor........................................................77
  92.      FileExist.......................................................78
  93.      FileOpen........................................................79
  94.      GameInfoUpdate..................................................80
  95.      GetTime.........................................................81
  96.      HighScores......................................................82
  97.      Incomm..........................................................83
  98.      MenuManager.....................................................85
  99.      MoveCursor......................................................86
  100.      NL..............................................................87
  101.      Parser..........................................................88
  102.      PromptIncomm....................................................89
  103.      QSend...........................................................90
  104.      RainbowSend.....................................................91
  105.      RandNum.........................................................92
  106.      ReadUsers.......................................................93
  107.      Send............................................................94
  108.      ShellToDos......................................................95
  109.      Sorter..........................................................96
  110.      SysopPage.......................................................97
  111.      TimeConvert.....................................................98
  112.      ViewFile........................................................99
  113.      WaitASec........................................................100
  114.      WindowInput.....................................................101
  115.      WindowPrint.....................................................102
  116.      Windows.........................................................103
  117.      WriteUsers......................................................104   Door Source 4.0B
  118.   Programmer's Manual - Page 4
  119.  
  120.         Disclaimer and Credits
  121.         ----------------------
  122.     This software (including instructions for its use) is provided "as is"
  123.     without warranty of any kine. Further, the author does not warrant,
  124.     guarantee, or make any representations regarding the use, or the results
  125.     of the use, of the software or written materials converning the software
  126.     in terms of correctness, accuracy, reliabilty, currentnes, or otherwise.
  127.     The entire risk as to the results and performance of the software is
  128.     assumed by you. If the software or written materials are defective, you,
  129.     and not the author or the author's distributors or employees, assume
  130.     the entire cost of all necessary servicing, repair, or correction.
  131.  
  132.     Neither the author nor anyone else who has been involved in the creation,
  133.     production, or delivery of this software shall be liable for any direct,
  134.     indirect, consequential, or incidental damages (including damages for
  135.     loss of business profits, business interruption, loss of business
  136.     information, and the like) arising out of the use of or inability of
  137.     to use such software. Distribution of the software is allowed as long
  138.     as it is in complete form as when you recieved it. Distribution of
  139.     the files without the documentation is not allowed. Distribution of the
  140.     libraries made by the installer program is not allowed.
  141.  
  142.     Sorry for such a long disclaimer, but you have to cover that legal stuff.
  143.  
  144.     QuickBasic (R) is a registered trade mark of Microsoft Corporation
  145.  
  146.     PCBoard (R) is a registered trade mark of Clark Development Company (CDC)
  147.  
  148.     MS-DOS (R) is a registered trade mark of Microsoft Corporation
  149.  
  150.     Door Source is copyrighted Computer City, USA 1988, 1989, 1990, 1991
  151.  
  152.  
  153.     Troy Getty - For helping in the testing of 4.0 and suggesting a
  154.         badly needed routine, ShellToDOS.
  155.  
  156.     Daniel Sharpe - For letting us put the RainbowSend command into Door
  157.         Source.
  158.  
  159.     Premo Mondone - Who has given me suggestions for 3.0 and above
  160.  
  161.     To all my competitors - Who give me inspiration to make this product
  162.         better than theirs. (And cheaper too!)
  163.   Door Source 4.0B
  164.   Programmer's Manual - Page 5
  165.  
  166.         Introduction
  167.         ------------
  168.            Welcome to Door Source! Door Source is a Quick Basic library,
  169.     intended for using with versions 4.0 and above. Door Source provides
  170.     you with a collection of routines to help you interface with a bulletin
  171.     board and the communications port to make a "door", or otherwise
  172.     referred to as a third party program, that adds onto the board.
  173.            Some people don't like having to read a large manual, and rather
  174.     jump right in with both feet and start off, if you would like to quickly
  175.     start, please read the following two sections after this introduction.
  176.     It is advised however, that you read Door Writing Techniques, and
  177.     Getting More out of Door Source too. If you have previously used
  178.     Door Source, you should refer to Converting from 3.2 or before and
  179.     also to the Summary of New Features. Door Source will also be
  180.     referred to as DS in this manual.
  181.            Door Source is provided to you free of charge, and you can
  182.     receive technical support at (919) 294-1770 (DATA 2400 max).
  183.     Door Source users will be given free access to the other nodes
  184.     after first calling the number above.
  185.  
  186.         Files included
  187.         --------------
  188.            Here is a list of files that you should have:
  189.  
  190.                 DS40    .DOC - Door Source 4.0B documentation
  191.                 DOORSORC.INT - Door Source 4.0B include file
  192.                 DSGAME  .INT - Door Source 4.0B include file
  193.                 WINDDEMO.BAS - Window demo using the Window routine
  194.                 MENUDEMO.BAS - Menu demo using the MenuManager routine
  195.                 PRMTDEMO.BAS - Prompts demo using various input routines
  196.                 BLCKDEMO.BAS - A demo using the UserBlock type declaration
  197.                 ERRDEMO .BAS - A demo with the CarrierLossError variable
  198.                 SAMPLE  .BAS - A sample door program written with Door Source
  199.                 MANUAL  .FRM - A form to order a printed manual with disks
  200.                 LOADQB  .BAT - A batch file to make loading DS easier
  201.                 DS00x   .DS4 - These are special files with extra routines
  202.                 DSINST  .EXE - This will help you select the right object
  203.                                files for the most compact DS library.
  204.                 DSINST  .DOC - Documentation on how to use the installer
  205.                 COMPRESS.ZIP - A program to compress the HighScores data files
  206.                 DOORINST.ZIP - A program to install your doors on other boards
  207.   Door Source 4.0B
  208.   Programmer's Manual - Page 6
  209.  
  210.         The deal on NO registration
  211.         ---------------------------
  212.            This may seem extremely odd, but Door Source is offered 100%
  213.         completely free. There are no registration fees, no more forms,
  214.         you don't ever have to send us a thing!
  215.            Why? Many years ago when Door Source was first started on,
  216.         I realized the need for a better product in the field of door
  217.         tool kits, and I decided that I would try to fill that gap, but
  218.         at no charge. All the other door kits (that I know of) ask for
  219.         some kind of registration, and I think this is truly one of the
  220.         first that requires none at all.
  221.            But I do like to know who is using Door Source, and a call to
  222.         PC-Technologies just to say thanks, or, better yet, to give a
  223.         suggestion for improvements, is always appreciated! If you have
  224.         a specific need for a routine or improvement to the Door Source
  225.         library, you can call and tell it to me, and you're guaranteed
  226.         that 90% of all improvements or suggestions are added within a
  227.         few releases!
  228.  
  229.   Door Source 4.0B
  230.   Programmer's Manual - Page 7
  231.  
  232.         Some Never Nevers
  233.         -----------------
  234.            There are some things you never should do when using Door Source.
  235.         What you shouldn't do is listed below, and since most people won't
  236.         believe it unless they know why, we have included reasons, and
  237.         in some cases, alternate routines to use instead.
  238.  
  239.         Never use CLS, VIEW PRINT, PRINT, LOCATE, or COLOR because
  240.            Door Source handles all screen output, and using these
  241.            will cause Door Source to lose some of its pointers on the
  242.            screen. Also, on systems using DesqView, it could cause lock ups.
  243.  
  244.         Never use OPEN COM or ON COM, because Door Source doesn't use
  245.            Quick Basic's communication routines, and using these would
  246.            cause a confliction of interrupts between Door Source and
  247.            Quick Basic, that would lead to unpredictable results.
  248.  
  249.         Never use SCREEN, because Door Source handles screen output,
  250.            it wouldn't be able to follow your change to a different
  251.            mode, and would cause serious problems.
  252.  
  253.         Never use END or SYSTEM, because that would cause Door Source
  254.            to leave its interrupt handlers still in place and the
  255.            next program to run would probably crash.
  256.  
  257.         Never use DEFINT, or any of DEF beside DEF FN, because
  258.            Door Source expects variables to be passed that are in
  259.            single precision format (the default of Quick Basic).
  260.  
  261.         Never use PLAY or SOUND, because it will cause a sound
  262.            when the sysop using your door program may not want sound,
  263.            like in the middle of the night, use BeepSpeaker instead
  264.            of BEEP or SOUND, and AnsiMusic instead of PLAY.
  265.  
  266.   Door Source 4.0B
  267.   Programmer's Manual - Page 8
  268.   
  269.      Quick Start
  270.      -----------
  271.  
  272.         Installing and loading Door Source
  273.         ----------------------------------
  274.            After you have unzipped the Door Source file (assuming that you
  275.         have since you're reading this), you will only need to copy a few
  276.         files into your Quick Basic sub-directory. All you will need to
  277.         do is run DSINST, the Door Source Installer, and then copy DS40.QLB
  278.         and DS40.LIB into your QuickBasic directory. Now you are ready
  279.         to load up Quick Basic, which you can do by typing:
  280.  
  281.            QBX [your program name] /L DS40
  282.  
  283.            You also can add on a /CMD[command$ string] that would place
  284.         what you put there into COMMAND$ inside Quick Basic. This would
  285.         be used to easily specify your configuration file for the door,
  286.         an example is this:
  287.  
  288.            QBX MYDOOR /L DS40 /CMDTESTDOOR.CFG LOCAL
  289.  
  290.            Putting a space in between the /CMD and TESTDOOR.CFG will
  291.         cause Door Source not to recognize your configuration file
  292.         properly.
  293.  
  294.         The First Few Lines
  295.         -------------------
  296.            Once inside the Quick Basic environment, ready to write a
  297.         new door program, the first line should always be:
  298.  
  299.         ' $INCLUDE:'DOORSORC.INT'
  300.  
  301.            This will tell Quick Basic to include this file into your
  302.         program. What this file contains is declarations for the
  303.         Door Source routines (to help eliminate errors), a COMMON SHARED
  304.         block, along with a few CONSTant declarations. At the end of the
  305.         file, it calls the InitDoor routine, which starts Door Source
  306.         rolling. The next line after that in your program should be:
  307.  
  308.         PROGNAME$ = "My Door"
  309.  
  310.            You should replace "My Door" with the name of your door. But
  311.         make sure that it is in quotations, or Quick Basic will give you
  312.         a Type mismatch error. The name placed in this string shouldn't
  313.         exceed 20 characters. The next line should be:
  314.  
  315.         RELEASE$ = "1.0"
  316.  
  317.  
  318.   Door Source 4.0B
  319.   Programmer's Manual - Page 9
  320.  
  321.            This is the release number (or version number) of your door
  322.         program. It should be less than 6 characters long, and can contain
  323.         letters and numbers (A-Z, a-z, 0-9), as well as punctuation.
  324.  
  325.         CALL ClrScrn
  326.  
  327.            CALL ClrScrn should be the next line in your program. It will
  328.         clear the screen, and now you almost ready to go on about your
  329.         door, however, there is one last thing. In the DOORSORC.INT, when
  330.         it calls InitDoor, it will leave a file open for you (file number 1)
  331.         and this file is the configuration file. If you would like to
  332.         INPUT anything from it, do that here, and once you are done inputing
  333.         anything else that was added onto the configuration file, or if
  334.         you didn't input anything at all, you will need to add one last
  335.         line, which is:
  336.  
  337.         CLOSE #1
  338.  
  339.            Now you are ready to write your door. A few basic routines that
  340.         you should look up are Send (on page XX), Incomm (on page XX),
  341.         ClrScrn (on page XX), and NL (on page XX). I'm sure you are
  342.         sick of reading this manual by now, but these are the 4 most
  343.         basic commands. You should also read Testing Your Door before you
  344.         try to run the door for the first time, because there are a few
  345.         things to make sure that you have in your program, and on your
  346.         disk in order for it to work.
  347.   Door Source 4.0B
  348.   Programmer's Manual - Page 10
  349.  
  350.         Getting Started
  351.         ---------------
  352.  
  353.         Writing a simple program in Door Source
  354.         ---------------------------------------
  355.            Before you can really do anything, you'll need to run the
  356.         Door Source Installer, DSINST, to create DS40.QLB and DS40.LIB.
  357.            Before loading Quick Basic, make sure that you have set the
  358.         proper environment strings to direct Quick Basic to your Door
  359.         Source directory (if you have one).
  360.            You will also need to make a configuration file that you
  361.         can use to test a simple door with. The Door Source configuration
  362.         file format is a simple four line file. You can make it longer
  363.         if your door needs information from it (see Advanced Techniques).
  364.         An example configuration file might be called TESTDOOR.CFG and look
  365.         like this:
  366.  
  367.         C:\PCB\PCBOARD.SYS
  368.         PC-Technologies
  369.         Todd
  370.         Miller
  371.  
  372.            The first line is a drive/path/filename to the bbs interface file,
  373.         and the second line is the name of the bbs using the door. The third
  374.         line is the first name of the sysop and the fourth line is the last
  375.         name of the sysop.
  376.            Now, load up Quick Basic, with the /L (library) switch on it like
  377.         this:
  378.  
  379.         QBX /L DS40
  380.  
  381.            That will load up Quick Basic and the Door Source library. Two other
  382.         switches that you might use when loading Quick Basic are:
  383.  
  384.         /RUN             - This is put at the beginning of the line right after
  385.                            QB and will make Quick Basic run the file specified.
  386.         /CMDMYCONFIG.CFG - The /CMD option always comes at the end, and what
  387.                            comes DIRECTLY after the /CMD will be loaded into
  388.                            the COMMAND$, this simulates what you would have
  389.                            if someone loaded your program like this:
  390.                            MYDOOR MYCONFIG.CFG
  391.                            The MYCONFIG.CFG would be put in the COMMAND$, but
  392.                            if you want to test doors inside Quick Basic, you
  393.                            should use this option, or set the COMMAND$ from
  394.                            the Run menu in Quick Basic.
  395.  
  396.  
  397.   Door Source 4.0B
  398.   Programmer's Manual - Page 11
  399.  
  400.            Once Quick Basic is loaded, you should press ALT-R to get the
  401.         Run menu, and the select Modify COMMAND$ (If it isn't listed, then
  402.         go to the options menu and select Full Menus, then try again). Now
  403.         enter in the name of the configuration file that you made earlier
  404.         before loading (If you didn't make it, you can shell to dos from the
  405.         File menu and make it there). Put after the configuration filename,
  406.         the word LOCAL. LOCAL will tell Door Source to read the configuration
  407.         file, but not to use the BBS interface file. Door Source will prompt
  408.         you for a name, and if you want to use ANSI graphics. This way, you
  409.         don't have to worry about making a test PCBOARD.SYS, DORINFO1.DEF,
  410.         CALLINFO.BBS, or DOOR.SYS. If you didn't specify LOCAL, it would look
  411.         for the bbs interface file that you gave it.
  412.            Now type the following program into Quick Basic:
  413.  
  414.         ' $INCLUDE:'DOORSORC.INT'
  415.         PROGNAME$="Hello World"
  416.         RELEASE$="1.0"
  417.         CALL ClrScrn
  418.         CLOSE #1
  419.  
  420.         CALL Send("Hello World!",No,Yes,10)
  421.         CALL Incomm("How are you today, @FIRST@ ?",No,No,14)
  422.         CALL ExitDoor
  423.  
  424.            Press the F5 key and the program will run. If you receive an
  425.         error, refer to Common Questions to find a solution. You should
  426.         see Door Source ask you for a name, and if you want ANSI graphics.
  427.         Then the screen will clear and it will say Hello World! in High
  428.         Intensity Green, and the beneath that it will show How are you today,
  429.         with your first name. Enter in anything you want and press enter.
  430.         It will then say Closing Door... and more. You'll also notice that
  431.         at the bottom of the screen is a status line, and it will be
  432.         discussed later in this section. Now let's find out how this
  433.         program works.
  434.            First, the INCLUDE file has a lot of DECLAREs in it and a
  435.         COMMON SHARED block, it also makes a CALL to the Door Source
  436.         routine InitDoor. Inside InitDoor, Door Source will read the
  437.         configuration file, process the bbs interface file (in this
  438.         case, it will ask you for your name and if you want ANSI
  439.         instead), and it will set up the communications port if it
  440.         is going to be used.
  441.            In the next two lines, you set up two variables. PROGNAME$
  442.         should be the name of your program. RELEASE$ should be the
  443.         version number of your program. Door Source will display these
  444.         on the status line. PROGNAME$ shouldn't be bigger than 20 characters
  445.   Door Source 4.0B
  446.   Programmer's Manual - Page 12
  447.  
  448.         and RELEASE$ shouldn't be bigger than 5 characters. They both
  449.         can contain A-Z, a-z, 0-9, and punctuation.
  450.            Then you make a call to the Door Source routine ClrScrn, which
  451.         clears the screen (local and remote), and updates the status line.
  452.         At this point, if you had added onto the configuration file, you
  453.         would read it here, but since we didn't, we just close the file
  454.         that InitDoor left open for us.
  455.            The first four lines of the program above should be the first
  456.         four lines in all of your doors, except you would replace what
  457.         PROGNAME$ and RELEASE$ with information for your door.
  458.            Send is a Door Source routine that outputs (local and remote)
  459.         a string, and can optionly beep the speaker, and send a enter when
  460.         done. The number is the color number, here's the format for calling
  461.         Send.
  462.  
  463.         CALL Send("Hello World!", No, Yes, 10)
  464.                    ^              ^   ^    ^
  465.                    |              |   |    Color to use
  466.                    |              |   Send enter when done?
  467.                    |              Beep the speaker when done?
  468.                    What to output
  469.  
  470.            Incomm is another routine that outputs first and then waits
  471.         for input back. There are many options that you can use with
  472.         Incomm, most which are in global variables, which are covered
  473.         in the reference for it. Here's the way to call Incomm:
  474.  
  475.         CALL Incomm("How are you today, @FIRST@ ?", No, No, 14)
  476.                      ^                              ^   ^   ^
  477.                      |                              |   |   Color to use
  478.                      |                              |   Limit the length? If
  479.                      |                              |   so, max length.
  480.                      |                              Send enter before input?
  481.                      What to output first
  482.  
  483.            You may have noticed how @FIRST@ wasn't displayed on the screen,
  484.         but your first name was instead. That's because that when Door Source
  485.         sees one of these, it knows to replace it with what you want instead.
  486.         There is a complete list of these in Appendix D.
  487.            The last call is to ExitDoor, which closes up Door Source files
  488.         and removes the Door Source interrupt handlers. If you use END
  489.         instead of ExitDoor, then the interrupt handlers will remain in
  490.         place, causing the next program to run to crash. ExitDoor will
  491.         also insure that the caller stays connected while he/she is transferred
  492.         back to the bbs.
  493.  
  494.   Door Source 4.0B
  495.   Programmer's Manual - Page 13
  496.  
  497.         Colors
  498.         ------
  499.            Door Source can support foreground and background colors. There
  500.         are three different ways that you can use and change colors too.
  501.         Here's a color chart:
  502.  
  503.         #       Name           Hex     Foreground   Background
  504.         0       Black           0          Y            Y
  505.         1       Blue            1          Y            Y
  506.         2       Green           2          Y            Y
  507.         3       Cyan            3          Y            Y
  508.         4       Red             4          Y            Y
  509.         5       Magenta         5          Y            Y
  510.         6       Brown           6          Y            Y
  511.         7       White           7          Y            Y
  512.         8       Gray            8          Y            N
  513.         9       HiBlue          9          Y            N
  514.         10      HiGreen         A          Y            N
  515.         11      HiCyan          B          Y            N
  516.         12      HiRed           C          Y            N
  517.         13      HiMagenta       D          Y            N
  518.         14      Yellow          E          Y            N
  519.         15      HiWhite         F          Y            N
  520.  
  521.         Way #1 to use color
  522.         -------------------
  523.            CALL Send("Hello!",No,No,12)
  524.            CALL Send("Bye!",No,Yes,10)
  525.  
  526.            This would output Hello! in high intensity red and on the same
  527.            line it would put Bye! in high intensity green.
  528.  
  529.         Way #2 to use color
  530.         -------------------
  531.            CALL Send("Hello!",No,Yes,HiRed)
  532.            CALL Send("Bye!",No,Yes,HiGreen)
  533.  
  534.            This would output the same thing as above, the only difference
  535.            is that it is easier to read.
  536.  
  537.         Way #3 to use color
  538.         -------------------
  539.            CALL Send("Hello!@X0ABye!",No,Yes,12)
  540.  
  541.            This would output the same as the first and second way, but
  542.            this one does it with one string. The whole key to this method
  543.            is the @X0A code in the middle. It tells Door Source to change
  544.            colors.
  545.  
  546.   Door Source 4.0B
  547.   Programmer's Manual - Page 14
  548.  
  549.         Color Code
  550.         ----------
  551.            Here's how to use the special color codes:
  552.  
  553.                 @X0F
  554.                 ^^^^
  555.                 |||Foreground color
  556.                 ||Background color
  557.                 |Second part of signal code
  558.                 First part of signal code
  559.  
  560.            You can also change the background color by setting the
  561.            variable BackGroundColor to a color number on the chart
  562.            above that is valid a background color (0-7).
  563.  
  564.         Command Line Options
  565.         --------------------
  566.            Door Source has numerous command line options in order to provide
  567.         flexibility with most computer systems. Here is a list:
  568.  
  569.                 LOCKED:xxxxx  - Forces Dooor Source to lock the modem at the
  570.                                 speed given.
  571.                 LOCAL         - Forces Door Source to run in local mode. This
  572.                                 is really meant for testing purposes, but it
  573.                                 still reads the configuration file, but doesn't
  574.                                 read the bbs interface file.
  575.                 NETWORK       - Forces file sharing to be active incase you
  576.                                 are using something other than SHARE to manage
  577.                                 file locking.
  578.                 IRQ=n         - Lets you change the IRQ used for the com port
  579.                                 specified in the bbs interface file.
  580.                                 (See below for more information)
  581.                 ADDR=&Hnnnn   - Lets you change the address used for the com
  582.                                 port specified in the bbs interface file.
  583.                                 (See below for more information)
  584.                 PS2           - Forces the PS/2 IRQs and addresses if a PS/2
  585.                                 isn't detected (Normally it is, but you can't
  586.                                 always tell!)
  587.                 RBBS          - Forces Door Source into RBBS/QBBS mode
  588.                 WILDCAT       - Forces Door Source into Wildcat 2.0 mode
  589.                 DOORSYS       - Forces Door Source into 31-Line DOOR.SYS mode
  590.                 PCB121        - Forces Door Source into PCBoard 11.8/12.x mode
  591.                                 with COM 1 active
  592.                 PCB122        - Forces Door Source into PCBoard 11.8/12.x mode
  593.                                 with COM 2 active
  594.                 PCB14         - (DEFAULT) Forces Door Source into PCBoard 14.x
  595.                                 mode
  596.  
  597.   Door Source 4.0B
  598.   Programmer's Manual - Page 15
  599.  
  600.         When you use the IRQ or the ADDR option, you must include the other.
  601.         You can't use just the IRQ and not the ADDR, and you can't use just
  602.         the ADDR and not the IRQ. Here's a chart with the STANDARD IRQs
  603.         and addresses for the PS/2s and IBM PCs:
  604.                                 Non PS/2
  605.                 Com port       IRQ     Address
  606.                    1             4       &H3F8
  607.                    2             3       &H2F8
  608.                    3             4       &H3E8
  609.                    4             3       &H2E8
  610.                   5-8            4       &H3F8
  611.  
  612.                                 PS/2
  613.                 Com port       IRQ     Address
  614.                    1             4       &H3F8
  615.                    2             3       &H2F8
  616.                    3             3       &H3220
  617.                    4             3       &H3228
  618.                    5             3       &H4220
  619.                    6             3       &H4228
  620.                    7             3       &H5220
  621.                    8             3       &H5228
  622.  
  623.   Door Source 4.0B
  624.   Programmer's Manual - Page 16
  625.  
  626.         Door Writing Techniques
  627.         -----------------------
  628.            When writing a door, you should keep three concepts in mind, they
  629.         are:
  630.  
  631.         1) Compatibility
  632.         2) Flexibility
  633.         3) Multi-node
  634.  
  635.            A compatible door is a door that easily runs on several bbs types.
  636.         Door Source currently supports PCBoard 11.8+, PCBoard 14.x, WildCat,
  637.         RBBS/QBBS DORINFO1.DEF, and the 31-line version of DOOR.SYS. Modifying
  638.         specific detailed parts of the user's information makes the door
  639.         less portable, since not all systems have the same information as
  640.         others.
  641.            A flexible door is one that allows the sysop to EASILY tell the
  642.         game where things are, and to set the options that they want.
  643.         Options like a tournament mode, turns per day, plays per day, etc,...
  644.         are good options to have. Letting the sysop define text from the
  645.         door is stretching this a little, but some sysops like this feature.
  646.         Of course it does mean a lot of work on your part too.
  647.            A multi-node door is often the hardest to write, but not if you
  648.         know how. Really it is very easy, easier than most think. You first
  649.         have to decide how multi-node you want your door to get. For example,
  650.         you might not won't to try to program something to let two players
  651.         on at the same time attack each other, so maybe you don't let on
  652.         go into the same sector as another that is currently on, or you
  653.         could go for the more complex way and do a one-on-one active battle
  654.         mode (which players would like). But the one thing all multi-node
  655.         doors must do is to share files correctly, and the way to do this
  656.         is to open files as SHARED, and to LOCK and UNLOCK individual records.
  657.         You will also want to keep in contact with other nodes playing
  658.         your door at the same time, and this can be done with a simple file
  659.         that would be organized by node. It would tell the other nodes if
  660.         it was running maintenance (so the others would play while it was), or
  661.         to tell the other nodes where someone is. In the Door Source Door
  662.         tool kit, it contains routines to maintain a file, and others to
  663.         help make your door more multinode. A multi-node door is always
  664.         praised by the sysops of a multi-node system.
  665.  
  666.         Quick Basic problems
  667.         --------------------
  668.            Quick Basic does have a few problems, and you will encounter them
  669.         if you are working on a large door project. You will probably
  670.         encounter a "Out of Stack Space" or a "Out of Data Space" error.
  671.         I've found that exiting to DOS and then coming back will usually
  672.         solve the problem. If not, then its time to do some work on your
  673.         program. If you know that you're door will be large, or if your
  674.         door gets larger than you expected, then here are a few tips on
  675.         how to get rid of these problems, or to prevent them:
  676.   Door Source 4.0B
  677.   Programmer's Manual - Page 17
  678.  
  679.                 1) Use variables, not constants. When you call a routine,
  680.                    like Send, and pass it a constant, the space that the
  681.                    constant used is not released for other programs to use.
  682.                    Instead, it stays in memory until your program quits.
  683.                    So call Send or other routines this way, by defining your
  684.                    variable first.
  685.  
  686.                         Lin$="Hello!":ColorToUse=10
  687.                         CALL Send(Lin$, No, Yes, ColorToUse)
  688.  
  689.                    If you didn't set up the variables before hand, you
  690.                    would have just used up 12 bytes of stack space that
  691.                    wouldn't be made available for other things. (I didn't
  692.                    miscount, a string has a 4 byte discriptor on it.)
  693.  
  694.                 2) Use MAKEDS so that your Door Source library will be
  695.                    as small as possible, and so it won't take up extra
  696.                    space with routines you don't need.
  697.  
  698.                 3) Use as few variables as possible. You should set aside
  699.                    two or three variables for your loops, a few for input,
  700.                    and a few for output, etc,... Just don't go around
  701.                    putting in new variables, because it will eliminate
  702.                    stack space.
  703.  
  704.                 4) If you are using your own COMMON SHARED block, eliminate
  705.                    all unnecessary variables from it, and don't declare
  706.                    a function or subroutine as STATIC unless necessary.
  707.  
  708.         Large doors
  709.         -----------
  710.            When writing LARGE doors with Door Source, you should use
  711.         a multi-module program. To create a new module, you must select
  712.         the Create file option from the file menu (full menus only).
  713.         Here are some tips for writing large doors:
  714.  
  715.                 1) Make a COMMON SHARED block for each of your modules
  716.                    that has commonly used variables.
  717.  
  718.                 2) Include the DOORSORC.INT at the beginning of each module
  719.                    so that it can use the Door Source routines and variables.
  720.  
  721.                 3) Make as many things as possible a routine or a function,
  722.                    and place those routines and functions into a module of
  723.                    their own (You could even have several modules of routines).
  724.  
  725.                 4) Remember that you can't GOTO or GOSUB to a line number or a
  726.                    label in another module.
  727.  
  728.   Door Source 4.0B
  729.   Programmer's Manual - Page 18
  730.  
  731.                 5) Anything that is done more than once is a good candidate for
  732.                    routine or function, even if it just calculates a score
  733.                    or shows lots of information.
  734.  
  735.                 6) When calling routines (Door Source or your own), pass
  736.                    variables, not constants to them.
  737.  
  738.   Door Source 4.0B
  739.   Programmer's Manual - Page 19
  740.  
  741.         Gathering Data from the User
  742.         ----------------------------
  743.            When writing your door, you will want to keep a consistent, but
  744.         friendly and easy to use approach to receiving information back from
  745.         the user. Using the PromptIncomm or EntryIncomm is a good way to
  746.         gather a limited amount of data, PromptIncomm is most useful for
  747.         yes and no questions, and for amounts. EntryIncomm is good for
  748.         long replies (sentences, names, etc,...).
  749.            You can also vary Incomm in a number of ways, the Incomm routine
  750.         is the kernel for PromptIncomm and EntryIncomm. You can write your own
  751.         routine to first do your special prompt and then call Incomm. For
  752.         example, if you wanted to make a prompt that used RainbowSend so the
  753.         prompt is lots of different colors, you could do this:
  754.  
  755.         SUB RainbowInput(Text$, LimitField)
  756.            CALL RainbowSend(Text$, No, No, 11)
  757.            CALL Incomm("", No, LimitField, Last.Clr.Used)
  758.         END SUB
  759.  
  760.            This would be output Text$ (the prompt) using RainbowSend first,
  761.         then use Incomm to receive the data. The variable, Last.Clr.Used, is
  762.         a Door Source variable that has the number of the last color used
  763.         stored in it.
  764.            If you have specific keys that you want the user to use and to
  765.         lock out the others, use the Table$ and Default.Table$ to limit
  766.         the input to certain keys, for example:
  767.  
  768.            Table$="YN"
  769.            CALL Incomm("Do you want to quit (Y/N) ? ", No, 1, 14)
  770.            Table$=Default.Table$
  771.  
  772.            The above example first sets Table$ to equal YN, now Door Source
  773.         will only allow the user to input the letters Y and N (Lower case
  774.         will NOT work, you have to add in the lower case letters too!).
  775.         The last line sets Table$ back to the default (when Door Source
  776.         starts, Table$ is already at the default). This is very important
  777.         so that you don't accidentally keep limiting input when you don't
  778.         want to. Also, NEVER change Default.Table$, doing so will make it
  779.         only harder on you to undo the Table$ setting. You don't have to
  780.         worry about adding in characters like backspace or enter, because
  781.         Door Source assumes that you will want to let the user use those
  782.         keys. Table$ does not affect any output routines, only the Door
  783.         Source input routines (except CommInkey$ and CommKeyInkey$ functions)
  784.  
  785.   Door Source 4.0B
  786.   Programmer's Manual - Page 20
  787.  
  788.         Making friendly menus
  789.         ---------------------
  790.            Friendly menus (to you and the user) are menus that can be
  791.         aborted in the middle of display. To make a friendly menu in
  792.         Door Source, define a array and put your menu in it. This also
  793.         makes it easy for you to make a quick change to one or all of
  794.         your menus if you have all of the arrays in the same place.
  795.         An example of how to make a friendly menu would be:
  796.  
  797.         CONST Main.Menu.Length = 5
  798.  
  799.         DIM Main.Menu$(5)
  800.  
  801.         Main.Menu$(1)="(1) Quit"
  802.         Main.Menu$(2)="(2) Quit"
  803.         Main.Menu$(3)="(3) Quit"
  804.         Main.Menu$(4)="(4) Quit"
  805.         Main.Menu$(5)="(5) Quit"
  806.  
  807.         CALL BlockSend(Main.Menu$(), No, Main.Menu.Length)
  808.  
  809.            If the user was to press the space bar, CTRL-X, or CTRL-K while
  810.         the menu was displaying, it would stop displaying and let your
  811.         program go on to receive the input.
  812.            Another form of the friendly menu (but doesn't allow aborting)
  813.         is using MenuManager to display your menu, and allows ANSI users to
  814.         use a scroll bar to scroll up and down and make their choice, and
  815.         allows non-ANSI users to enter their selection.
  816.  
  817.         Presenting information in a compact format
  818.         ------------------------------------------
  819.            Displaying ten, twenty character long lines, on ten separate lines
  820.         is a waste of space. Instead, you could compact the display to five
  821.         lines, or even less. Setting TabSpace in between calls to one of the
  822.         Send routines will let you make a nicely formatted display, for example:
  823.  
  824.            CALL Send("Info #1:"+Info1$, No, No, 10)
  825.            TabSpace = 40
  826.            CALL Send("Info #2:"+Info2$, No, Yes, 10)
  827.            CALL Send("Info #3:"+Info3$, No, No, 10)
  828.            TabSpace = 40
  829.            CALL Send("Info #4:"+Info4$, No, Yes, 10)
  830.  
  831.         Would look like:
  832.  
  833.         Info #1: Something                      Info #2: Something else
  834.         Info #3: Anything                       Info #4: Anything else!
  835.  
  836.   Door Source 4.0B
  837.   Programmer's Manual - Page 21
  838.  
  839.            If you want to display information from an array in a compact
  840.         format, you could do this:
  841.  
  842.            Stack = 0
  843.            FOR X = 1 TO 10
  844.               IF Stack = 0 THEN
  845.                  CALL Send("Info :"+Info$(X), No, No, 10)
  846.                  TabSpace = 40
  847.                  Stack = 1
  848.               ELSE
  849.                  CALL Send("Info :"+Info$(X), No, Yes, 10)
  850.                  Stack = 0
  851.               END IF
  852.            NEXT X
  853.            IF TabSpace = 40 THEN TabSpace = 0
  854.  
  855.            In the above example, the variable Stack changes from 0 to 1 and
  856.         back again to keep track of whether or not it's time to tab over to
  857.         column 40 or to end the line. The IF after the NEXT X makes sure that
  858.         you aren't set at column 40 for your next output when you don't want
  859.         to be.
  860.            You could also put in another IF block inside the FOR loop to let
  861.         you decide whether or not you have any information to display or not.
  862.         You could also modify all the above examples so that you could have
  863.         three columns and not just two.
  864.  
  865.         The Configuration File
  866.         ----------------------
  867.            You can make the configuration file for your door program larger
  868.         than what Door Source requires it to be, and you can read in the
  869.         information yourself too. Door Source automatically reads in the
  870.         first four lines of the configuration file and sets everything up
  871.         for you to read the rest. Reading more from the configuration file
  872.         is simple:
  873.  
  874.         ' $INCLUDE:'DOORSORC.INT'
  875.         ProgName$="Configuration Reader"
  876.         Release$="1.0"
  877.         LINE INPUT #1, ExtraInfo$
  878.         LINE INPUT #1, ExtraNumber
  879.         CLOSE #1
  880.         CALL ClrScrn
  881.  
  882.            Even though there is no open statement, Door Source opened the
  883.         file and read the information from it already (It did this from in
  884.         the DOORSORC.INT). Remember to close the file after use, even if you
  885.         don't use it at all. The only limit to how long your configuration
  886.         file can be is the disk space and the amount of memory you can
  887.         use to store the information. The configuration file can not be
  888.         in a random access format, only sequential.
  889.   Door Source 4.0B
  890.   Programmer's Manual - Page 22
  891.  
  892.         Testing your Door
  893.         -----------------
  894.            The easiest way to test your door is to run it from inside the
  895.         Quick Basic environment. You first have to have three things done
  896.         so that you can, and they are:
  897.  
  898.                 1) Have a sample configuration file in the Quick Basic
  899.                    directory.
  900.  
  901.                 2) Load Quick Basic with the /L option and DS40 after it
  902.                    For example:
  903.                         QB /L DS40 /CMDTESTDOOR.CFG LOCAL
  904.  
  905.                 3) Load Quick Basic with the /CMD option and your configuration
  906.                    file's name after it with the word LOCAL.
  907.                    (See above example)
  908.  
  909.            If you forgot to load with the /CMD option, you can set it from
  910.         inside Quick Basic from the Run menu (Modify COMMAND$).
  911.            Now all you have to do is press F5 to run your program. If you
  912.         have any problems, refer to Appendix C - Common Questions.
  913.  
  914.   Door Source 4.0B
  915.   Programmer's Manual - Page 23
  916.  
  917.         Finishing your Door
  918.         -------------------
  919.            To eliminate all possible problems, you should first thoroughly test
  920.         you door in two manners, logically, and unlogically. When you are
  921.         logically testing it, you should use your door the way you designed
  922.         it to be used, noting the little problems as you go. Then when you
  923.         unlogically test it, you try testing your program in a way completely
  924.         opposite of how you designed it. This method is a through method to
  925.         debug your program. You will find most of the errors through this
  926.         method, but then there are always situations that even you didn't
  927.         think of in either of these manners.
  928.            To finish a door you will need to compile to door into a EXE format.
  929.         This way you can use the door without having to load QuickBasic to run
  930.         your doors. Since Door Source doesn't use Quick Basic's communications
  931.         routines, you CAN compile your door to be a stand-alone program, that
  932.         doesn't need BRUN45.EXE. If you prefer to not make it a stand-alone,
  933.         you do not have to use a patched version of BRUN45.EXE like other
  934.         door packages require.
  935.            In order to compile your program, you must go to the Run menu and
  936.         select Make EXE. It will compile your program in memory and then
  937.         a window will pop up asking what you want the final file name of the
  938.         program to be, and other options. Do not select the produce debug
  939.         code option, it will only make your program larger and slower, and
  940.         allow people to break it in the middle by pressing CTRL-Break. After
  941.         you have everything like you want it, select one of the button on the
  942.         bottom of the window to start the process.
  943.            Of course, you'll need to provide some documentation for your
  944.         door, and good documentation should have some of these sections listed
  945.         here:
  946.                 Table of contents
  947.                 Disclaimer
  948.                 Overview/Summary of the door
  949.                 List of files in archive
  950.                 Configuration file setup
  951.                 Command line options
  952.                 Batch file setup
  953.                 Customization instructions
  954.                 List of function/ALT keys
  955.                 Possible errors/Troubleshooting
  956.  
  957.            A good disclaimer is always something that is hard to come by, here
  958.         is a disclaimer that pretty much covers you:
  959.  
  960.                 This program and other files associated with it are not
  961.                 guaranteed to be bug free or virus free. We are not
  962.                 responsible for any damages of any kind, including
  963.                 profit loses and data loss, that relate directly or
  964.                 indirectly to these programs and files. You may
  965.                 distribute this program, as long as it is in unmodified
  966.                 form with all the files originally included.
  967.   Door Source 4.0B
  968.   Programmer's Manual - Page 24
  969.  
  970.            You may wish to add/change/delete something from this one, but it
  971.         is a pretty good one. A overview or summary of the door would be a
  972.         simple explanation of exactly what your door does, no specifics
  973.         really. The configuration file section should show a sample
  974.         configuration file, and give a sentence or two on each line in the
  975.         file. The command line options should show the user how to
  976.         configure the door to run with his system. Refer to the chapter
  977.         on command line options to put into your documentation.
  978.            The batch file setup should show a few example batch files, and
  979.         telling you if you need to add it in your daily event, etc,...
  980.         The customization section should tell the sysop that uses your door
  981.         how to better customize it to what he needs. Some examples might be
  982.         aliases allowed/not allowed, location of files, prompts, etc,...
  983.            The list of function keys is basically this:
  984.  
  985.                   F3  - Printer toggle
  986.                   F4  - Page bell toggle
  987.                   F5  - Shell to DOS
  988.                   F7  - Caller alarm toggle
  989.                   F8  - Return caller to board
  990.                   F10 - Start sysop chat
  991.                   ESC - Enter sysop chat
  992.                 ALT-X - Drop to DOS after caller logs off
  993.                 ALT-N - Sysop next on flag
  994.  
  995.            Troubleshooting should list a few possible errors that might
  996.         occur, and how to solve them. Like if error number 53 (File not found)
  997.         occurs, then search your configuration file for a misspelled filename
  998.         or a wrong path. If error 61 (Disk full) occurs, free up disk space.
  999.         Some errors can't be solved, and you could list those and have them
  1000.         call a bulletin board for more help.
  1001.  
  1002.   Door Source 4.0B
  1003.   Programmer's Manual - Page 25
  1004.  
  1005.         Getting more out of Door Source
  1006.         -------------------------------
  1007.  
  1008.         This section and the following section, Advanced Techniques, are
  1009.         very closely related. With Door Source 4.0B, it is basically possible
  1010.         for you to write your own input and output routines using out base
  1011.         routines to do the dirty work. The difference in between this section
  1012.         and the next is simply that this tells you how to take advantage of
  1013.         some of the new variables and features, and the next section tells
  1014.         you more on programming more advanced things with Door Source.
  1015.  
  1016.         The definable page sound
  1017.         ------------------------
  1018.  
  1019.            You can easily change the sound of the SysopPage routine by
  1020.         setting 3 variables - PageSound.1, PageSound.2, and PageSound.3
  1021.         The sound generated is in the order of PageSound.1, then PageSound.2,
  1022.         and then the final sound is PageSound.3. The numbers you put in
  1023.         PageSound should be in the acceptable range of the SOUND command,
  1024.         which is somewhere around 45-32767. A page sound of 200, 400, 600
  1025.         would make a sound that starts out low, then the next sound is
  1026.         about double the pitch of the first, and the third is double the
  1027.         pitch of the second. Its possible to create a variety of different
  1028.         sounds with this, try experimenting with the SOUND command first to
  1029.         find what you like the best. The duration of the sounds is set, and
  1030.         can't be changed.
  1031.                 Example:
  1032.                 PageSound.1=200
  1033.                 PageSound.2=400
  1034.                 PageSound.3=600
  1035.                 CALL SysopPage(Answered)
  1036.  
  1037.         Filtering your input
  1038.         --------------------
  1039.  
  1040.            Sometimes, you may want to limit the input to a question to a
  1041.         few letters, or selectively not recognize certain characters. To
  1042.         do so, you should set the Table$ variable. An example would be:
  1043.                 Example:
  1044.                 Table$ = "YNyn"
  1045.                 CALL Incomm("You can only type Y and N:",No,1,15)
  1046.                 ' Anything else besides Y,N,y,n that the user types is
  1047.                 ' not displayed or recognized. Backspace and enter CAN NOT
  1048.                 ' be filtered out.
  1049.                 Table$ = Default.Table$
  1050.                 ' This is necessary to reset the filter back to normal,
  1051.                 ' if you didn't do this then you'll have problems with
  1052.                 ' later Incomm commands still being restricted with the
  1053.                 ' filtering.
  1054.                 Output:
  1055.                 You can only type Y and N:Y   Door Source 4.0B
  1056.   Programmer's Manual - Page 26
  1057.  
  1058.         Protecting input from prying eyes
  1059.         ---------------------------------
  1060.  
  1061.            When a password or something secret needs to be concealed, you
  1062.         can now set a "substitution character" that will be displayed in
  1063.         place of what the user really types. You can make the character
  1064.         anything you wish, but making it a null turns it off.
  1065.                 Example:
  1066.                 Protected.Input$="*" ' Now shows a * in place of text
  1067.                 CALL Incomm("Password:", No, No, 15)
  1068.                 Protected.Input$=""  ' Turns it off - Back to normal display
  1069.                 Output:
  1070.                 Password:******
  1071.  
  1072.         Two fancier input prompts
  1073.         -------------------------
  1074.  
  1075.            EntryIncomm
  1076.            -----------
  1077.            EntryIncomm prints out a field of (----) above the area where
  1078.            the user's input will be displayed. The size of the field is based
  1079.            on how big you make the field. Good for ANSI and NON-ANSI!
  1080.                 Example:
  1081.                 CALL EntryIncomm("Your new name:", 25, LightGreen, Yellow)
  1082.                 '                                  ^ Field size
  1083.                 Output:
  1084.                              (-------------------------)
  1085.                 Your new name:Zantigahicatal
  1086.  
  1087.            PromptIncomm
  1088.            ------------
  1089.            PromptIncomm is most useful in ANSI cases, but will handle
  1090.            non-ansi well too, but the purpose of the routine is defeated
  1091.            then. What it does is create a field similar to the EntryIncomm
  1092.            but the field is on the same line as the input. The second text
  1093.            field is the "default field" tells the user what it defaults to
  1094.            if they press enter, but its up to you to interpret them pressing
  1095.            enter. You can pass a string as the second parameter, and it
  1096.            will use that instead of one of the already programmed constants.
  1097.            The constants are:
  1098.                 Default1 = (Enter=no)
  1099.                 Default2 = (Enter=none)
  1100.                 Default3 = (Enter=quits)
  1101.  
  1102.                 Example:
  1103.                 CALL PromptIncomm("Do you wish to quit",Default1,
  1104.                         LightGreen, 1, Yellow)
  1105.                 '                   ^ Field size
  1106.                 Output:
  1107.                 Do you wish to quit (Enter=no) ? (N)   Door Source 4.0B
  1108.   Programmer's Manual - Page 27
  1109.  
  1110.            Unabortable ViewFiles
  1111.            ---------------------
  1112.            Do you want to force the user to see out an entire file? Its easy
  1113.            to block the abort codes by setting the variable No.Abort to YES,
  1114.            then when the user tries to abort, it won't let him. However, if
  1115.            more prompts are still offered, answering NO to it will stop the
  1116.            display.
  1117.                 Example:
  1118.                 No.Abort = YES
  1119.                 CALL ViewFile("MYFILE.ANS", No, No, No)
  1120.                 No.Abort = NO   ' Reset it back to normal
  1121.  
  1122.            Disabling carrier checking
  1123.            --------------------------
  1124.            How would you like to turn off carrier checking for a
  1125.            call back verification program of some sort, or something
  1126.            along those lines? Try setting Carrier.Check to YES, and
  1127.            Door Source will *IGNORE* the carrier detect flag. If the
  1128.            user drops carrier, you'll have to handle and detect yourself!
  1129.                 Example:
  1130.                 Carrier.Check = No  ' Disables carrier checking
  1131.                 Carrier.Check = Yes ' (Default) enables carrier checking
  1132.  
  1133.            Checking the baud and the carrier, setting DTR, CTS, and RTS
  1134.            ------------------------------------------------------------
  1135.  
  1136.               Checking the baud rate
  1137.               ----------------------
  1138.               The variable Baud& has the baud rate stored in it. Here's
  1139.               what the number in it means:
  1140.                         1       - Local mode
  1141.                         300     - 300 baud
  1142.                         1200    - 1200 baud
  1143.                         2400    - 2400 baud
  1144.                         4800    - 4800 baud
  1145.                         9600    - 9600 baud
  1146.                         19200   - 19,200 baud
  1147.                         38400   - 38,400 baud
  1148.                         115200  - 115,200 baud
  1149.  
  1150.               Since some boards run with their modem locked, Door Source
  1151.               will give you the locked baud rate in Baud&, but the true
  1152.               connect speed is in TrueBaud&
  1153.  
  1154.               Checking the carrier
  1155.               --------------------
  1156.               The routine CheckCarrier will tell you if a carrier is
  1157.               present.
  1158.                 Example:
  1159.                 CALL CheckCarrier(CarrierFlag)
  1160.                 IF CarrierFlag = NO AND Baud& > 1 THEN
  1161.                    CALL ExitDoor  ' Carrier lost!
  1162.                 END IF
  1163.  
  1164.   Door Source 4.0B
  1165.   Programmer's Manual - Page 28
  1166.  
  1167.               Setting the DTR, CTS, and RTS
  1168.               -----------------------------
  1169.  
  1170.                 DTR
  1171.                 ---
  1172.                 The DTR (Data Terminal Ready) when on normally means that
  1173.                 you are on-line, and have a connection. However, on most
  1174.                 modems, turning it off while it is on will break the
  1175.                 connection.
  1176.                         Example:
  1177.                         CALL ChangeDTR(YES)   ' Turn DTR on
  1178.                         CALL ChangeDTR(NO)    ' Turn DTR off
  1179.  
  1180.                 CTS Control On/Off
  1181.                 ------------------
  1182.                 CTS (Clear To Send) is used to signal the other modem that
  1183.                 it is ok to send characters. Modems that don't preform
  1184.                 error checking or UARTS that don't have buffers may require
  1185.                 CTS flow-control to be on during high-speed file transfers.
  1186.                         Example:
  1187.                         CALL ChangeCTS(YES)   ' Turn CTS control on
  1188.                         CALL ChangeCTS(NO)    ' Turn CTS control off
  1189.  
  1190.                 RTS
  1191.                 ---
  1192.                 RTS (Request To Send) is used by most auto-dial modems to
  1193.                 see if a computer is ready to receive data from the modem.
  1194.                 If the RTS signal isn't detected, some modems may refuse
  1195.                 to accept modem commands or send result codes.
  1196.                         Example:
  1197.                         CALL ChangeRTS(YES)   ' Turn RTS on
  1198.                         CALL ChangeRTS(NO)    ' Turn RTS off
  1199.  
  1200.            Automatic more prompts
  1201.            ----------------------
  1202.            If you're displaying lots of information, like programmed in
  1203.            documentation, and you don't want to keep track of when you
  1204.            need to show a more prompt or a press any key prompt, just
  1205.            simply set the AutoMore variable to one of the settings:
  1206.                 0                              Disables the prompts (default)
  1207.                 MorePrompt    (Or the value 1) Causes automatic more prompts
  1208.                 PressKeyPromp (Or the value 2) Causes automatic press any key
  1209.                 Example:
  1210.                     AutoMore = MorePrompt
  1211.            The variable Lines.Since will tell you how many lines have been
  1212.            sent SINCE the last ClrScrn WITH one of the Send routines or
  1213.            Incomm routines. The automatic prompts are by default not
  1214.            enabled, and when enabled, they occur every 23 lines.
  1215.  
  1216.   Door Source 4.0B
  1217.   Programmer's Manual - Page 29
  1218.  
  1219.         Advanced Techniques
  1220.         -------------------
  1221.            Door Source has several new features that are more program
  1222.         related, that are just a little bit to hard to put in the previous
  1223.         section, Getting more out of Door Source.
  1224.  
  1225.            The extra line status line
  1226.            --------------------------
  1227.            Normally, Door Source has lines 24 and 25 in use with its status
  1228.            line, but if you have some information of you're own that you'd
  1229.            like to put on it, now you can by using the GameInfoUpdate
  1230.            routine with the variable GameInfoCol.
  1231.            The only major change you have to make to your program is to use
  1232.            the DSGAME.INT file instead of the DOORSORC.INT file, and you'll
  1233.            need to write a routine to do the status line updating.
  1234.            First of all, the Door Source status line is moved up to lines
  1235.            23 and 24, and we leave 25 for your use. You call the
  1236.            GameInfoUpdate routine like you would call print, for example:
  1237.                 ' $INCLUDE:'DSGAME.INT'
  1238.                   .
  1239.                   .  (Later in the program)                         Background
  1240.                   .                                                     \/
  1241.                 CALL GameInfoUpdate("This is on the 25th line!", No, 14, 7)
  1242.                                      ^ Text                      ^   ^
  1243.                                                                  |   Foreground
  1244.                                                                  Enter
  1245.            The background is the last number, and the color you specify is
  1246.            the foreground color. The enter parameter is like the ; on a
  1247.            print command, telling it no keeps the current position at that
  1248.            spot, but yes will start at column 1 when you do the next
  1249.            GameInfoUpdate.
  1250.            But what if you want to position the cursor somewhere on the
  1251.            line without printing to that location? Or what if you want
  1252.            to know where the cursor is? You can tell both of these by
  1253.            looking at the GameInfoCol variable. For example:
  1254.                 A = GameInfoCol   ' A now contains the horizontal position
  1255.                                   ' of the cursor on line 25.
  1256.                 GameInfoCol = 30  ' With the next GameInfoUpdate call, it
  1257.                                   ' will start printing at column 30.
  1258.            Now the only thing missing is your interfacing this into your
  1259.            program. The easiest way to do this is to write a new ClrScrn
  1260.            routine, that you call in place of ClrScrn, this is necessary
  1261.            because ClrScrn doesn't update your line when called, so you'll
  1262.            have to do it. Here's an example of a new ClrScrn:
  1263.               SUB ClearTheScreen
  1264.                  CALL ClrScrn
  1265.                  CALL GameInfoUpdate("This is on the 25th line!",No,14,7)
  1266.               END SUB
  1267.  
  1268.   Door Source 4.0B
  1269.   Programmer's Manual - Page 30
  1270.  
  1271.            Writing your own output routines
  1272.            --------------------------------
  1273.               With Door Source, you can virtually write your own output
  1274.            routines for use with your program. The kernel for all of our
  1275.            output routines is the Send1Line routine. It will send one
  1276.            line out to the local and remote display, and will decode the
  1277.            substitution codes too! All that's left for you to do is to
  1278.            write your own routine that calls this routine. For example,
  1279.            say you wanted to write a routine that would colorize all of the
  1280.            letters that are the capital A, then you might do this:
  1281.               SUB ColorizeTheA(Text$,AColor$,RegularColor$)
  1282.                  FOR X=1 TO LEN(Text$)
  1283.                     IF MID$(Text$,X,1)="A" THEN
  1284.                        CALL Send1Line(AColor$+MID$(Text$,X,1))
  1285.                     ELSE
  1286.                        CALL Send1Line(RegularColor$+MID$(Text$,X,1))
  1287.                     END IF
  1288.                  NEXT X
  1289.               END SUB
  1290.            The variables AColor$ and RegularColor$ would store the @X color
  1291.            codes for the colors for A's and other letters.
  1292.  
  1293.            Writing your own input routines
  1294.            -------------------------------
  1295.               You can write your own input routines too with Door Source.
  1296.            The main kernel for the input routine is CommInkey$, and a few
  1297.            other routines supplement the features offered in Incomm. An
  1298.            example input routine that is very simple might be:
  1299.               SUB GetInput
  1300.                  DO
  1301.                     A$=CommInkey$
  1302.                     IF A$="" THEN A$=INKEY$
  1303.                  LOOP UNTIL A$<>""
  1304.                  ARG$=A$
  1305.               END SUB
  1306.            You should also be aware that all filters, and special variables
  1307.            that affect input with Incomm do NOT work with CommInkey$, you
  1308.            have to program in support for them yourself if you want them.
  1309.            The GetInput routine above would wait for a key to be pressed
  1310.            on the local or remote keyboard. Now say that you want to echo
  1311.            the character to the screen and to the remote screen, you'd do
  1312.            this:
  1313.               SUB GetInput
  1314.                  DO
  1315.                     A$=CommInkey$
  1316.                     IF A$="" THEN A$=INKEY$
  1317.                  LOOP UNTIL A$<>""
  1318.                  ARG$=A$
  1319.                  CALL Send1Line(A$)   ' Echos the character
  1320.               END SUB
  1321.   Door Source 4.0B
  1322.   Programmer's Manual - Page 31
  1323.  
  1324.            Now maybe you want to trap the function keys, you could do this:
  1325.               SUB GetInput
  1326.                  DO
  1327.                     A$=CommInkey$
  1328.                     IF A$="" THEN A$=INKEY$
  1329.                  LOOP UNTIL A$<>""
  1330.                  ARG$=A$
  1331.                  IF LEFT$(A$,1)=CHR$(0) THEN
  1332.                     CALL ExtendedCode(A$,NULL) ' Process the function key
  1333.                  ELSE
  1334.                     CALL Send1Line(A$)         ' Echos the character
  1335.                  END IF
  1336.               END SUB
  1337.            The NULL variable on the ExtendedCode is used only by Incomm,
  1338.            and you shouldn't pass anything to it in place of it, and its
  1339.            not used to return anything to your program. Now the GetInput
  1340.            routine we have above is pretty good. It will accept input
  1341.            from the keyboard and from remote, check for a extended code
  1342.            and process it, otherwise it will echo the character.
  1343.            You can also write your own chat routine, but use our code
  1344.            by calling Incomm with the second parameter as a 5. This
  1345.            will print the "Sysop started chat at" and the "Hello, this is"
  1346.            lines, and then will handle the input and color for you, then
  1347.            once the sysop presses ESC to end the chat, it will print the
  1348.            "Sysop ended chat at" and return control to you. So basically, by
  1349.            passing a 5 as the second parameter forces a chat.
  1350.               Example:
  1351.               CALL Incomm("",5,No,15)   ' Forces a chat
  1352.  
  1353.            Carrier loss processing
  1354.            ----------------------
  1355.               Sometimes in more complex doors, its necessary to process
  1356.            a carrier drop yourself in order to save and wrap up files.
  1357.            You could turn carrier checking off, but its best if you use
  1358.            the CarrierLossError method. What you do is set CarrierLossError
  1359.            to YES and when carrier is dropped, a error number 255 will be
  1360.            forced, and if you have a ON ERROR trapping processing in your
  1361.            program, you will be able to catch it, and then let Door Source
  1362.            finish off the rest. For an example, please refer to the example
  1363.            program ERRDEMO.BAS.
  1364.  
  1365.   Door Source 4.0B
  1366.   Programmer's Manual - Page 32
  1367.  
  1368.         How a door works
  1369.         ----------------
  1370.            Understanding how a door works is good to know so that you can
  1371.         better plan your door. Here's a simple diagram on what happens:
  1372.  
  1373.                         BBS Creates the interface file and exits
  1374.                                          \|/
  1375.                                 Door's batch file is run
  1376.                                          \|/
  1377.              |-->      Door loads and reads in the interface file
  1378.              |                           \|/
  1379. Door Source  |      The door opens the communications port if needed
  1380. handles this |                           \|/
  1381. with your    |                 User interacts with the door
  1382. program      |                           \|/
  1383.              |-->  Door eventually exits, updating the interface file
  1384.                                          \|/
  1385.                        BBS reloads and reads in the interface file
  1386.                                          \|/
  1387.                               User continues using the bbs
  1388.  
  1389.         The DOORSORC.INT file sets up the necessary DECLAREs for the routines
  1390.         and the functions, it then sets up the COMMON SHARED block which lets
  1391.         you share variables with Door Source, like Baud&. Then it sets up
  1392.         a few constants, and then calls InitDoor, then the Door Source library
  1393.         takes over, and reads the configuration file, initialize its variables
  1394.         and then opens the com port for access. Then control is returned to
  1395.         you and your program picks up from their setting the program's name
  1396.         and version, etc,... While you're doing other processing, Door Source
  1397.         is ALWAYS looking at the com port, keeping received data in its
  1398.         buffer until you're ready for it. Door Source monitors everything
  1399.         for you, from carrier detection to characters being sent to
  1400.         characters being received, all behind the scenes.
  1401.  
  1402.   Door Source 4.0B
  1403.   Programmer's Manual - Page 33
  1404.  
  1405.         Converting from Door Source 3.2 or before to 4.0
  1406.         ------------------------------------------------
  1407.            There are a few changes in how you call routines from 3.2 and
  1408.         before. Here's the list and how to change your program to fit 4.0
  1409.         without major restructuring. The easiest way to change things is
  1410.         using the QuickBasic search and replace feature from the edit menu.
  1411.  
  1412.          * Routine AllTrun is now a function, you use it like this:
  1413.                 A$ = AllTrun$(A$)
  1414.          * Routine HighScores has a extra parameter. The new third parameter
  1415.            lets you output its output to a already open file by passing the
  1416.            file number, but if you pass a 0, it outputs to the screen.
  1417.                 CALL HighScores(Score, ScoreDataFile$, OutputFileNumber)
  1418.          * Routine Windows has a few parameters changes, the text foreground
  1419.            and text background have been deleted since WindowPrint and
  1420.            WindowInput do all window processing. Windows in your program
  1421.            will need to be re-written because of this.
  1422.                 CALL Windows(ULR, ULC, LRR, LRC, Foreground, Background,
  1423.                         Border, Shadow)
  1424.          * Routine Windows has two new borders, they are:
  1425.                 3 - Double horizontal Single vertical
  1426.                 4 - Single horizontal Double vertical
  1427.  
  1428.          * Routine DayOfWeek moved into ScriptCMD.
  1429.                 I1$="DAYOFWEEK":CALL ScriptCMD
  1430.          * Routine MenuManager parameters have been changed, the Select$
  1431.            parameter has been deleted, since now ANSI.Select$ and
  1432.            NonANSI.Select$ (COMMON SHARED variables) are now used for the
  1433.            select string. BarForeground and BarBack have been added, they
  1434.            have the foreground and background color for the selection bar.
  1435.                 CALL MenuManager(Menu$(),Center,TextColor,NumberOfSelections,
  1436.                    BarForeground, BarBackground, BarnumberSelected)
  1437.          * Routine SysopPage now has an extra parameter, this extra one is
  1438.            used to return a variable in, not to pass one. It returns a 1 (YES)
  1439.            if the page was answered.
  1440.                 CALL SysopPage(Answered)
  1441.          * Routine ErrorLevelSet has been removed because of environment
  1442.            conflicts.
  1443.  
  1444.   Door Source 4.0B
  1445.   Programmer's Manual - Page 34
  1446.  
  1447.         Summary of new features
  1448.         -----------------------
  1449.                 LOCAL command line switch added
  1450.                 NETWORK command line switch added
  1451.                 Up.Key$ and Down.Key$ variables added
  1452.                 SysopPage changed
  1453.                 PageSound.1, PageSound.2, and PageSound.3 added
  1454.                 Page.String$ added
  1455.                 F5 (Shell to DOS) added
  1456.                 F3 (Printer toggle) added
  1457.                 GameInfoUpdate routine added
  1458.                 GameInfoCol added
  1459.                 Table$ and Default.Table$ added
  1460.                 PromptIncomm routine added
  1461.                 No.Abort added
  1462.                 MenuManager changed
  1463.                 Parser changed
  1464.                 WindowPrint and WindowInput routines added
  1465.                 ExtendedCode routine added
  1466.                 Protected.Input$ added
  1467.                 BlockSend routine added
  1468.                 RainbowSend routine added
  1469.                 Windows routine changed
  1470.                 DayOfWeek routine moved into ScriptCMD
  1471.                 RandNum function fixed
  1472.                 EntryIncomm added
  1473.                 AllTrun routine changed into a function
  1474.                 CheckCarrier routine added
  1475.                 Baud& variable added
  1476.                 CarrierLossError added
  1477.                 Carrier.Check added
  1478.                 ChangeDTR, ChangeCTS, and ChangeRTS added
  1479.                 IRQ command line parameter added
  1480.                 ADDR command line parameter added
  1481.                 PS2 command line parameter added
  1482.                 HighScores changed
  1483.                 ALL ROUTINES optimized to run faster, and to be more compact
  1484.  
  1485.   Door Source 4.0B
  1486.   Programmer's Manual - Page 35
  1487.  
  1488.         Appendix A - CALL Syntax
  1489.         ------------------------
  1490.  
  1491.         CALL QSend(Text$, Enter)
  1492.         CALL BackSpace(Text$)
  1493.         CALL ExtendedCode(Text$,NULL)
  1494.         CALL BeepSpeaker()
  1495.         CALL NL(Number.Of.Lines)
  1496.         CALL Send(Text$, Bell, Enter, Color.To.Use)
  1497.         CALL Incomm(Text$, Enter, Limit.Field, Color.To.Use)
  1498.         CALL ANSIMusic(Music$, Music)
  1499.         CALL GameInfoUpdate(Text$, Enter, Color.To.Use, Color.Background)
  1500.         CALL BackSpaceOver()
  1501.         CALL Center(Text$)
  1502.         CALL ClrScrn
  1503.         CALL ColorEasy(Text$, Color.To.Use, Enter)
  1504.         CALL DoorBusy()
  1505.         CALL ErrorLevelSet(Error.Level)
  1506.         CALL ExitDoor()
  1507.         CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  1508.         CALL HighScores(Score, Score.FileName$, OutputFileNumber)
  1509.         CALL MenuManager(Menu$(), Center, TextColor, Number.Of.Bars,
  1510.            Select.Color, BarForeground, BarBackground, BarSelected)
  1511.         CALL MoveCursor(X,Y)
  1512.         CALL Parser(SearchFor$, SearchIn$, Array$(), ErrCode)
  1513.         CALL ReadUsers(ErrCode)
  1514.         CALL ScriptCMD()
  1515.         CALL Sorter(Array$(), How.Many.Elements)
  1516.         CALL SysopPage(Answered)
  1517.         CALL TimeConvert(Hours, Minutes, New.Time$)
  1518.         CALL ViewFile(FileName$, Check.For.GFile, MorePrompts, EnterPrompt)
  1519.         CALL WaitASec(How.Many.Seconds.To.Wait)
  1520.         CALL Windows(ULR, ULC, LRR, LRC, Fore, Back, Border, Shadow)
  1521.         CALL WriteUsers(ErrCode)
  1522.         CALL BlockSend(Array$(), Center, Lines.To.Send)
  1523.         CALL WindowPrint(Text$, Row, Col, Fore, Back)
  1524.         CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  1525.         CALL RainbowSend(Text$, Bell, Enter, Color.To.Use)
  1526.         CALL PromptIncomm(Text$, Default$, DefaultColor, LimitField,
  1527.            Color.To.Use)
  1528.         CALL EntryIncomm(Text$, LimitField, FieldColor, Color.To.Use)
  1529.         CALL ShellToDos(Shell.String$)
  1530.  
  1531.   Door Source 4.0B
  1532.   Programmer's Manual - Page 36
  1533.  
  1534.         Appendix B - Optimizing your door
  1535.         ---------------------------------
  1536.            The best way to optimize a door program can be divided into two
  1537.         parts.
  1538.                 1) The first part is cleaning up your code. This would mean
  1539.                    elimination of most or all GOTOs and GOSUBs, elimination
  1540.                    of as many constants as possible, and elimination of
  1541.                    repetition in your code.
  1542.                 2) The second part is compiling from the command line.
  1543.                    QuickBasic compiles with some unneeded options when you
  1544.                    select the Make EXE command from the Run menu. You might
  1545.                    need the error trapping flag (/X) if you have a ON ERROR
  1546.                    statement in your program, and you might need the switch
  1547.                    for dynamic arrays (/AH) if you're using them. Here's a
  1548.                    sample compilation for a NON-STANDALONE program:
  1549.                       BC MYPROG;
  1550.                       LINK /EX MYPROG.BAS,MYPROG.EXE,,BRUN45.LIB+DOORSORC.LIB
  1551.  
  1552.                    For a STANDALONE program, use this:
  1553.                       BC MYPROG/O;
  1554.                       LINK /EX MYPROG.BAS,MYPROG.EXE,,BCOM45.LIB+DOORSORC.LIB
  1555.  
  1556.                    These parameters will compile the to the most compact
  1557.                    format. You can also use PKLITE to compress it more.
  1558.  
  1559.   Door Source 4.0B
  1560.   Programmer's Manual - Page 37
  1561.  
  1562.         Appendix C - Common Questions
  1563.         -----------------------------
  1564.         Q: How do I read in additional information from the configuration
  1565.            file?
  1566.         A: To read in more information, simply INPUT from file #1 after you
  1567.            call ClrScrn for the first time. Make sure to close it when you're
  1568.            done. Here's an example:
  1569.               ' $INCLUDE:'DOORSORC.INT'
  1570.               PROGNAME$="Example"
  1571.               RELEASE$="1.0"
  1572.               CALL ClrScrn
  1573.               INPUT #1, ExtraInfo
  1574.               CLOSE #1
  1575.            Door Source doesn't read past the fourth line of the configuration
  1576.            file, so you can put whatever you please there.
  1577.         Q: How do I test a door from inside QuickBasic?
  1578.         A: You must have first loaded QuickBasic with the /L option specifying
  1579.            the Door Source library. For example:
  1580.               QB MYDOOR /L DOORSORC
  1581.            Then you will need to setup the command line parameters by setting
  1582.            the COMMAND$, you do this from the Run menu from Modify COMMAND$.
  1583.            Now, as long as your configuration file, bbs interface file, and
  1584.            all other files you need exist, you can press F5 and test your door
  1585.            from QuickBasic.
  1586.         Q: Should I compile as a stand-alone door?
  1587.         A: It's up to you. A stand-alone door will not need the BRUN45.EXE,
  1588.            but it will make your door significantly larger, and compiling
  1589.            not as a stand-alone will save space. Door Source will work fine
  1590.            either way.
  1591.         Q: What does the error "Error opening port -1" mean?
  1592.         A: It means that you have specified a invalid serial port, and you
  1593.            should check your bbs interface file or your bbs's setup.
  1594.  
  1595.   Door Source 4.0B
  1596.   Programmer's Manual - Page 38
  1597.  
  1598.         Appendix D - Variable Reference
  1599.         -------------------------------
  1600.         The first part of this reference is of the global variables, the
  1601.         second is of the global UserBlock type declaration.
  1602.  
  1603.         Variable Name   Purpose
  1604.         -------------   ------------------------------------------------------
  1605.         ARG$            Input from user, returned by Incomm routine
  1606.         SYSDPATH$       Drive/Path/Filename of bbs interface file
  1607.         BBSName$        Name of BBS running on
  1608.         SysopNM$        Sysop FULL name
  1609.         CALLNAME$       Caller's FULL name
  1610.         TrueBaud&       True baud rate of the caller
  1611.         Baud&           Baud rate of caller
  1612.         PROGNAME$       Name of your door
  1613.         RELEASE$        Version of your door
  1614.         ANSI            Ansi Flag  (1 = On  0 = Off)
  1615.         I1$,I2$,I3$     Input variables to script commands
  1616.         O1$,O2$,O3$     Output variables from script commands
  1617.         User.Color      Color that user input will be display in
  1618.         BackGroundColor Color to use for background when displaying
  1619.         Exit.Dor.1$     First line of ExitDoor message
  1620.         Exit.Dor.2$     Second line of ExitDoor message
  1621.         Exit.Dor.Clr1   Color of first line
  1622.         Exit.Dor.Clr2   Color of second line
  1623.         UserF$          First name of caller
  1624.         UserL$          Last name of caller
  1625.         Caps            Convert all input to caps (1 = Yes  0 = No)
  1626.         Page.Bell       Page bell toggle (-1 = On  0 = Off)
  1627.         Caller.Alarm    Caller alarm (-1 = On  0 = Off)
  1628.         Sysop.Next      Sysop next on toggle (-1 = On  0 = Off)
  1629.         Hang.Up         Exit to DOS after log off toggle (-1 = On  0 = Off)
  1630.         User.Record     Record number of user
  1631.         Network         Network active (1 = Yes  0 = No)
  1632.         Display.Toggle  Display on/off toggle (ignored by DS -1 = On  0 = Off)
  1633.         Printer.Toggle  Printer on/off (-1 = On  0 = Off)
  1634.         BusyFlag        A signal to ExitDoor that DoorBusy routine is in use
  1635.         UserFile$       Drive/Path/Filename of USERS file (PCBoard ONLY!)
  1636.         Up.Key$         Key to be used for scrolling up in MenuManager
  1637.         Down.Key$       Key to be used for scrolling down in MenuManager
  1638.         Parity          Parity of user calling (7 or 8 data bits)
  1639.         Filter          Incomm filtering active (filters all high ascii out)
  1640.         BusyFile$       Drive/Path/Filename of busy file for DoorBusy routine
  1641.         SysFirst$       Sysop's first name
  1642.         SysLast$        Sysop's last name
  1643.         CommPort        Communacations port being used (1-8)
  1644.         Last.Clr.Used   Last color used in a call to Send
  1645.         EchoKey         STOPS echoing keys to remote user (1 = Yes  0 = No)
  1646.         No.Enter.Send   Incomm doesn't send enter when done (1 = Yes  0 = No)
  1647.         File.Missing$   String ViewFile$ displays when file is not found   Door Source 4.0B
  1648.   Programmer's Manual - Page 39
  1649.  
  1650.         BBSType$        Type of BBS in use (PCB14, PCB121, PCB122, WILDCAT,
  1651.                         RBBS, or DOORSYS)
  1652.         Node            Node caller is on (works on with PCBoard systems)
  1653.         TabSpace        Send will tab to this column before sending
  1654.         InverseText     Reverses the text colors (Foreground/Background switch)
  1655.         Sysop           Sysop is on (1 = Yes  0 = No)
  1656.         BlinkText       Send will make text blink
  1657.         Not.Around$     String to show when Sysop doesn't answer page
  1658.         PARAM$          Extra command-line parameters that DS didn't use
  1659.         Page.String$    String to display while paging
  1660.         PageSound.1     First tone of page
  1661.         PageSound.2     Second tone of page
  1662.         PageSound.3     Third tone of page
  1663.         GameInfoCol     Column to start printing on game status line
  1664.         Default.Table$  Table containing a unaltered filter
  1665.         Table$          Specific filtering of characters for Incomm
  1666.         KeyBoardTimeOut Number of SECONDS for a keyboard time out
  1667.         Protected.Input$  Incomm displays this instead of what user types
  1668.         ANSI.Select$    Menu Manager's ANSI selection string
  1669.         NonAnsi.Select$ Menu Manager's NON-ANSI selection string
  1670.         Carrier.Check   Disables carrier checking (1 = Yes  0 = No)
  1671.         CarrierLossError  Causes ExitDoor to generate a error 255 if carrier
  1672.                           is dropped.
  1673.         No.Abort        Disables CTRL-X, CTRL-K keys from aborting screens
  1674.                         (1 = Yes  0 = No)
  1675.         AutoMore        Automatically prints more prompts/press any key prompts
  1676.         Lines.Since     Number of lines printed since last more/press prompt
  1677.         
  1678.  
  1679.   Door Source 4.0B
  1680.   Programmer's Manual - Page 40
  1681.  
  1682.         This is the reference for the UserBlock global variable
  1683.  
  1684.                                             PCBOARD/PCBOARD.SYS
  1685.                                            /  WILDCAT/CALLINFO.BBS
  1686.                                           /  /  RBBS/DORINFO1.DEF 
  1687.                                          /  /  /  DOOR.SYS
  1688.                                         /  /  /  /
  1689.   Variable                Type          P  W  R  D   Description
  1690.  -------------------     -----------    -  -  -  -   -------------------------
  1691.  CityState            AS STRING * 24    Y  Y  Y  Y   City and state of user
  1692.  Password             AS STRING * 12    Y  Y     Y   User's Password
  1693.  BusinessPhone        AS STRING * 13    Y        Y   User's Business/Data phone
  1694.  VoicePhone           AS STRING * 13    Y  Y     Y   User's Voice/Home phone
  1695.  LastDateOn           AS STRING * 20    Y  Y     Y   Last date user was on
  1696.  LastTimeOn           AS STRING * 5     Y            Last time user was on
  1697.  ExpertMode           AS STRING * 1     Y  Y     Y   Expert mode "Y" or "N"
  1698.  ProtocolType         AS STRING * 5     Y  Y     Y   Protocol selected
  1699.  LastDirListing       AS STRING * 10    Y  Y         Last date viewed dir
  1700.  SecurityLevel        AS INTEGER        Y  Y  Y  Y   Security Level for user
  1701.  TimesOn              AS INTEGER        Y  Y     Y   Number of times on before
  1702.  PageLength           AS INTEGER        Y  Y         Page length for user
  1703.  TotalUploads         AS INTEGER        Y  Y     Y   Total # of uploads made
  1704.  TotalDownloads       AS INTEGER        Y  Y     Y   Total # of downloads made
  1705.  DailyDownloadBytes   AS DOUBLE         Y            # of download bytes left
  1706.  UserComment          AS STRING * 30    Y            User Comment field
  1707.  SysopComment         AS STRING * 30    Y            Sysop Comment field
  1708.  ElapsedTime          AS INTEGER        Y  Y         Elapsed Time on system  1
  1709.  Subscription         AS STRING * 20    Y
  1710.  SubscriptionExpire   AS STRING * 20    Y
  1711.  AreaRegistration     AS STRING * 50    Y  Y     Y   Areas user has access to
  1712.  AreaExpire           AS STRING * 50    Y
  1713.  AreasToScan          AS STRING * 50    Y
  1714.  TotalDownloadBytes   AS DOUBLE         Y  Y     Y   Total bytes downloaded
  1715.  TotalUploadBytes     AS DOUBLE         Y            Total bytes uploaded
  1716.  DeleteFlag           AS STRING * 1     Y            Flag to delete user
  1717.  TimeEnteredDoor      AS STRING * 5     Y  Y  Y  Y   Time user entered door
  1718.  AreaFrom             AS INTEGER        Y        Y   Area user exited from
  1719.  MemorizedMessage     AS LONG           Y            Memorized message #
  1720.  TimeCalled           AS STRING * 5     Y  Y         Time user called bbs
  1721.  DailyDownloadTotal   AS INTEGER           Y         Total downloads TODAY
  1722.  MaxDownloadLimit     AS DOUBLE            Y         Max downloads TODAY
  1723.  LastRead             AS INTEGER           Y         Message last read
  1724.  MaxDownloadKLimit    AS DOUBLE         Y  Y     Y   Max d/l K TODAY
  1725.  ExpirationDate       AS STRING * 10             Y
  1726.  LR0                  AS STRING * 4     Y
  1727.  LR1                  AS STRING * 4     Y
  1728.  LR2                  AS STRING * 4     Y
  1729.       .
  1730.       .
  1731.  LR39                 AS STRING * 4     Y
  1732.  
  1733.  
  1734.   Door Source 4.0B
  1735.   Programmer's Manual - Page 41
  1736.  
  1737.         Appendix E - Script Commands Reference
  1738.         --------------------------------------
  1739.         Script commands are several small routines packed all into one.
  1740.         In order to access them, you set the according variables, and
  1741.         then make a call to ScriptCMD routine. For example, if you
  1742.         wanted to display a Press [ANY KEY] to continue prompt, you
  1743.         could do this:
  1744.                 I1$ = "PRES"
  1745.                 CALL ScriptCMD
  1746.         Variables I1$, I2$, and I3$ are all INPUT variables that store
  1747.         information for the routine to use. O1$, O2$, and O3$ are all OUTPUT
  1748.         variables that return information from the routine to you.
  1749.         I1$ is always the name of the routine you're calling inside of
  1750.         ScriptCMD. You only have to specify the first 4 letters of the
  1751.         word unless stated in the documentation.
  1752.  
  1753.  
  1754.   Door Source 4.0B
  1755.   Programmer's Manual - Page 42
  1756.  
  1757.         LTRIM
  1758.  
  1759.         Purpose: To trim all leading spaces
  1760.  
  1761.         Name in ScriptCMD: LTRIM
  1762.  
  1763.         Remarks: This routine is a simple truncation routine to remove
  1764.         all leading spaces from a string.
  1765.  
  1766.         Parameters Passed:
  1767.                 I2$ - The string to be truncated
  1768.  
  1769.         Parameters Returned:
  1770.                 O1$ - The truncated string
  1771.  
  1772.  
  1773.   Door Source 4.0B
  1774.   Programmer's Manual - Page 43
  1775.  
  1776.         RTRIM
  1777.  
  1778.         Purpose: To trim all trailing spaces
  1779.  
  1780.         Name in ScriptCMD: RTRIM
  1781.  
  1782.         Remarks: This routine is a simple routine to truncate all trailing
  1783.         spaces from a string.
  1784.  
  1785.         Parameters Passed:
  1786.                 I2$ - The string to be truncated
  1787.  
  1788.         Parameters Returned:
  1789.                 O1$ - The truncated string
  1790.  
  1791.  
  1792.   Door Source 4.0B
  1793.   Programmer's Manual - Page 44
  1794.  
  1795.         Upper Case
  1796.  
  1797.         Purpose: To convert a string to all upper case
  1798.  
  1799.         Name in ScriptCMD: UPPER
  1800.  
  1801.         Remarks: This routine will convert a string into all upper case
  1802.  
  1803.         Parameters Passed:
  1804.                 I2$ - The string to be converted
  1805.  
  1806.         Parameters Returned:
  1807.                 O1$ - The converted string
  1808.  
  1809.  
  1810.   Door Source 4.0B
  1811.   Programmer's Manual - Page 45
  1812.  
  1813.         Lower case
  1814.  
  1815.         Purpose: To convert a string to all lower case
  1816.  
  1817.         Name in ScriptCMD: LOWER
  1818.  
  1819.         Remarks: This routine will convert a string into all lower case
  1820.  
  1821.         Parameters Passed:
  1822.                 I2$ - The string to be converted
  1823.  
  1824.         Parameters Returned:
  1825.                 O1$ - The converted string
  1826.  
  1827.  
  1828.   Door Source 4.0B
  1829.   Programmer's Manual - Page 46
  1830.  
  1831.         More Prompt
  1832.  
  1833.         Purpose: To display a more prompt
  1834.  
  1835.         Name in ScriptCMD: MORE
  1836.  
  1837.         Remarks: This will display a more prompt and allow the user to
  1838.         select Yes to continue, No to abort, and C to go non-stop. It
  1839.         will return a Y (for yes), a N (for no), or a C (for non-stop)
  1840.         in O1$
  1841.  
  1842.         Parameters Passed: None
  1843.  
  1844.         Parameters Returned:
  1845.                 O1$ - Contains a Y, N, or C
  1846.  
  1847.  
  1848.   Door Source 4.0B
  1849.   Programmer's Manual - Page 47
  1850.  
  1851.         Press Any Key
  1852.  
  1853.         Purpose: To display a Press [ANY KEY] to continue prompt
  1854.  
  1855.         Name inside ScriptCMD: PRESS
  1856.  
  1857.         Remarks: This will display a Press [ANY KEY] to continue prompt and
  1858.         then wait for the key to be pressed:
  1859.  
  1860.         Parameters Passed: None
  1861.  
  1862.         Parameters Returned: None
  1863.  
  1864.  
  1865.   Door Source 4.0B
  1866.   Programmer's Manual - Page 48
  1867.  
  1868.         Exist
  1869.  
  1870.         Purpose: To check if a file exists
  1871.  
  1872.         Name inside ScriptCMD: EXIST
  1873.  
  1874.         Remarks: This will check for the existence of the file specified.
  1875.  
  1876.         Parameters Passed:
  1877.                 I2$ - Drive/Path/Location of file to check for
  1878.  
  1879.         Parameters Returned:
  1880.                 O1$ - If the file exists
  1881.                       (Y = Yes  N = No)
  1882.  
  1883.  
  1884.   Door Source 4.0B
  1885.   Programmer's Manual - Page 49
  1886.  
  1887.         Name conversion
  1888.  
  1889.         Purpose: To convert a name into proper upper and lower case
  1890.  
  1891.         Name inside ScriptCMD: NAMECASE
  1892.  
  1893.         Remarks: This will take a name like "DR. JOHN DOE" and properly
  1894.         convert it into "Dr John Doe"
  1895.  
  1896.         Parameters Passed:
  1897.                 I2$ - The name to be converted
  1898.  
  1899.         Parameters Returned:
  1900.                 O1$ - The converted name
  1901.  
  1902.  
  1903.   Door Source 4.0B
  1904.   Programmer's Manual - Page 50
  1905.  
  1906.         Coding and Decoding
  1907.  
  1908.         Purpose: To code and decode a string
  1909.  
  1910.         Name inside ScriptCMD: CODER
  1911.  
  1912.         Remarks: This is a simple coding routine that will resist causal
  1913.         attempts to break it. It will code and decode with the same password.
  1914.         The longer the password, the better the protection you will have.
  1915.         The password shouldn't have any high ASCII characters in it.
  1916.  
  1917.         Parameters Passed:
  1918.                 I2$ - String to be coded/decode
  1919.  
  1920.                 I3$ - Password to code/decode with
  1921.  
  1922.         Parameters Returned:
  1923.                 O1$ - The coded/decoded string
  1924.  
  1925.  
  1926.   Door Source 4.0B
  1927.   Programmer's Manual - Page 51
  1928.  
  1929.         Reverse Bits
  1930.  
  1931.         Purpose: To reverse the bits in a string
  1932.  
  1933.         Name inside ScriptCMD: REVERSEBITS (MUST USE ENTIRE NAME!)
  1934.  
  1935.         Remarks: This will take all of the characters in a string and reverse
  1936.         it's bits. This is a simple, but easy to break coding routine. To
  1937.         unreverse the bits, just call the routine again.
  1938.  
  1939.         Parameters Passed:
  1940.                 I2$ - The string to bit reverse
  1941.  
  1942.         Parameters Returned:
  1943.                 O1$ - The bit reversed string
  1944.  
  1945.  
  1946.   Door Source 4.0B
  1947.   Programmer's Manual - Page 52
  1948.  
  1949.         Reverse Characters
  1950.  
  1951.         Purpose: To reverse the order of characters in a string
  1952.  
  1953.         Name inside ScriptCMD: REVERSECHARS (MUST USE ENTIRE NAME!)
  1954.  
  1955.         Remarks: This changes the order of characters in a string so that
  1956.         the first is last, and the last is first, and so on throughout the
  1957.         entire string. To decode it, simply call the routine again.
  1958.  
  1959.         Parameters Passed:
  1960.                 I2$ - The string to be reversed
  1961.  
  1962.         Parameters Returned:
  1963.                 O1$ - The reversed string
  1964.  
  1965.  
  1966.   Door Source 4.0B
  1967.   Programmer's Manual - Page 53
  1968.  
  1969.         Appendix F - Command Reference
  1970.         ------------------------------
  1971.  
  1972.         Each command is shown in a set format. The format is as follows:
  1973.  
  1974.         Name of routine
  1975.  
  1976.         Purpose: States the prupose of the routine
  1977.  
  1978.         Remarks: Tells you the general information on the routine and how
  1979.         to use it.
  1980.  
  1981.         Parameters Passed: Tells you what parameters to the routine and what
  1982.             they are for.
  1983.  
  1984.         Parameters Returned: Tells you what parameters are returned and what
  1985.             is in them.
  1986.  
  1987.         Example: A short little program showing the usage of the routine
  1988.  
  1989.         See Also: (on some routines) Gives you a reference to other routines
  1990.             that do nearly the same thing or that work with this routine.
  1991.   Door Source 4.0B
  1992.   Programmer's Manual - Page 54
  1993.  
  1994.         AdjustTimeLimit
  1995.  
  1996.         Purpose: To adjust the user's time remaining
  1997.  
  1998.         Syntax: CALL AdjustTimeLimit(Minutes)
  1999.  
  2000.         Remarks: This will adjust the user's time remaining up or down
  2001.         depending on the number you pass it. You *MUST* pass a variable
  2002.         and not a number as the parameter, otherwise the time will not
  2003.         change. The TimeLeft: on the status line will be updated on the
  2004.         next call to the Send command.
  2005.  
  2006.         Parameters Passed:
  2007.                 Minutes - The number of minutes to increase the user's time
  2008.  
  2009.         Parameters Returned: None
  2010.  
  2011.         Example:
  2012.                 TimeAdjust = 10
  2013.                 CALL AdjustTimeLimit(TimeAdjust)     ' Give 10 minutes
  2014.                 TimeAdjust = -10
  2015.                 CALL AdjustTimeLimit(TimeAdjust)     ' Take 10 minutes
  2016.  
  2017.   Door Source 4.0B
  2018.   Programmer's Manual - Page 55
  2019.  
  2020.         AllTrun$
  2021.  
  2022.         Purpose: To truncate all leading and trailing spaces from a string
  2023.  
  2024.         Syntax: Text$ = AllTrun$(Text$)
  2025.  
  2026.         Remarks: This will remove all of those leading and trailing spaces
  2027.         that are a result of random file input, use of STR$, and other
  2028.         functions of BASIC.
  2029.  
  2030.         Parameters Passed:
  2031.                 Text$ - The string to remove leading and trailing spaces from
  2032.  
  2033.         Parameters Returned:
  2034.                 Text$ - The string without leading and trailing spaces
  2035.  
  2036.         Example:
  2037.                 Text$ = "   These extra spaces will be removed   "
  2038.                 Text$ = AllTrun$(Text$)
  2039.   Door Source 4.0B
  2040.   Programmer's Manual - Page 56
  2041.  
  2042.         ANSIMusic
  2043.  
  2044.         Purpose: To play ANSI music to those users who can use it
  2045.  
  2046.         Syntax: CALL ANSIMusic(Music$, Music)
  2047.  
  2048.         Remarks: Some communacations programs can support and play ANSI music
  2049.         but not all of them. Qmodem, for example, will play ANSI music. You
  2050.         should ask your users near the beginning of the program "Do you have
  2051.         ANSI music?" and if they answer yes, then set Music to Yes (1)
  2052.         otherwise set it to No (0). You don't have to use Music, but whatever
  2053.         variable you store that value in should always be the second parameter
  2054.         of the call to this routine. The music string can be anything that
  2055.         the BASIC command PLAY would be able to play. The local speaker
  2056.         won't play the music unless the page bell is on.
  2057.  
  2058.         Parameters Passed:
  2059.                 Music$ - The music to be played
  2060.  
  2061.                 Music - If the user supports ANSI music or not
  2062.                         (1 = Yes  0 = No)
  2063.  
  2064.         Parameters Returned: None
  2065.  
  2066.         Example:
  2067.                 Music = Yes
  2068.                 Music$ = "ABCDEFG"
  2069.                 CALL ANSIMusic(Music$, Music)
  2070.  
  2071.   Door Source 4.0B
  2072.   Programmer's Manual - Page 57
  2073.  
  2074.         BackSpace
  2075.  
  2076.         Purpose: To backspace on the local and remote screen and also erase
  2077.         the proper character in the string passed
  2078.  
  2079.         Syntax: CALL BackSpace(Text$)
  2080.  
  2081.         Remarks: This will allow you to write your own input routines for
  2082.         use, and when a user presses the backspace key, call this routine and
  2083.         it will send the proper backspacing codes and erase the backspaced
  2084.         character from the string passed.
  2085.  
  2086.         Parameters Passed:
  2087.                 Text$ - A string that will the backspace will be preformed on
  2088.  
  2089.         Parameters Returned:
  2090.                 Text$ - The new string with the last character erased
  2091.  
  2092.         Example:
  2093.                 IF KeyPressed$ = CHR$(8) THEN
  2094.                    CALL BackSpace(Text$)
  2095.                 END IF
  2096.  
  2097.   Door Source 4.0B
  2098.   Programmer's Manual - Page 58
  2099.  
  2100.         BackSpaceOver
  2101.  
  2102.         Purpose: To erase what is already on a line
  2103.  
  2104.         Syntax: CALL BackSpaceOver
  2105.  
  2106.         Remarks: This routine will backspace over everything to column 1,
  2107.         erasing everything on that line. If you have a prompt that you'd
  2108.         like to erase or something, this is the routine to call to erase
  2109.         it.
  2110.  
  2111.         Parameters Passed: None
  2112.  
  2113.         Parameters Returned: None
  2114.  
  2115.         Example:
  2116.                 CALL BackSpaceOver
  2117.  
  2118.         See Also: BackSpaceToCol
  2119.  
  2120.         
  2121.   Door Source 4.0B
  2122.   Programmer's Manual - Page 59
  2123.  
  2124.         BackSpaceToCol
  2125.  
  2126.         Purpose: To backspace over to the specified column
  2127.  
  2128.         Syntax: CALL BackSpaceToCol(Col)
  2129.  
  2130.         Remarks: This will backspace over from the current column all the
  2131.         way to the column specified. This is useful if the user inputed a
  2132.         improper response to a prompt and you want to erase just the user's
  2133.         input.
  2134.  
  2135.         Parameters Passed:
  2136.              Col - The column to backspace over to
  2137.  
  2138.         Parameters Returned: None
  2139.  
  2140.         Example:
  2141.                 CALL Send("Backspace to here->this will be erased!",No,No,10)
  2142.                 CALL BackSpaceToCol(20)
  2143.  
  2144.         See Also: BackSpaceOver
  2145.  
  2146.   Door Source 4.0B
  2147.   Programmer's Manual - Page 60
  2148.  
  2149.         BeepSpeaker
  2150.  
  2151.         Purpose: To sound the local and remote speaker
  2152.  
  2153.         Syntax: CALL BeepSpeaker
  2154.  
  2155.         Remarks: Calling BeepSpeaker instead of sending a bell code to the
  2156.         screen and com port is better since it will always beep the remote
  2157.         speaker but won't make the local speaker sound unless the page bell
  2158.         is on.
  2159.  
  2160.         Parameters Passed: None
  2161.  
  2162.         Parameters Returned: None
  2163.  
  2164.         Example:
  2165.                 CALL BeepSpeaker        
  2166.         
  2167.   Door Source 4.0B
  2168.   Programmer's Manual - Page 61
  2169.  
  2170.         BlockSend
  2171.  
  2172.         Purpose: To send a large amount of information to both displays
  2173.  
  2174.         Syntax: CALL BlockSend(Array$(), Center, Lines.To.Send)
  2175.  
  2176.         Remarks: This will send a large pre-programmed amount of data
  2177.         to the local and remote displays. Color can only be set and
  2178.         changed via @X codes. This routine is good for programmed in
  2179.         documentation, or menus.
  2180.  
  2181.         Parameters Passed:
  2182.                 Array$() - The array to be displayed
  2183.  
  2184.                 Center - Center text to be displayed
  2185.  
  2186.                 Lines.To.Send - Number of array elements to display
  2187.  
  2188.         Parameters Returned: None
  2189.  
  2190.         Example:
  2191.                 Array$(1) = "This will be displayed"
  2192.                 Array$(2) = "Using the BlockSend routine"
  2193.                 CALL BlockSend(Array$(), No, 2)
  2194.  
  2195.         See Also: ColorEasy, RainbowSend, Send, QSend
  2196.  
  2197.   Door Source 4.0B
  2198.   Programmer's Manual - Page 62
  2199.  
  2200.         Center
  2201.  
  2202.         Purpose: To aid in centering strings for output
  2203.  
  2204.         Syntax: CALL Center(Text$)
  2205.  
  2206.         Remarks: This will strip out all @X codes and substitute in the
  2207.         proper text for substitution codes and will then set TabSpace to
  2208.         equal the correct column to make the string look centered. The
  2209.         string that you pass is NOT modified by this routine. This routine
  2210.         also will NOT print out the results but only set TabSpace.
  2211.  
  2212.         Parameters Passed:
  2213.                 Text$ - The string to be centered
  2214.  
  2215.         Parameters Returned: None
  2216.  
  2217.         Example:
  2218.                 Text$ = "This will be centered!"
  2219.                 CALL Center(Text$)
  2220.                 CALL Send(Text$, No, Yes, 10)
  2221.   Door Source 4.0B
  2222.   Programmer's Manual - Page 63
  2223.  
  2224.         ChangeCTS
  2225.  
  2226.         Purpose: To raise or lower the CTS flag
  2227.  
  2228.         Syntax: CALL ChangeCTS(OnOff)
  2229.  
  2230.         Remarks: This will turn on or off the CTS (Clear To Send) flag
  2231.         which is used to tell the other modem that it is okay to send
  2232.         characters. Modem that don't preform error checking or UARTS
  2233.         that don't have buffers may require CTS flow-control to be on
  2234.         during high speed file transfers.
  2235.  
  2236.         Parameters Passed:
  2237.              OnOff - Whether you want the CTS on or off
  2238.                      (1 = Yes(On)  0 = No(Off))
  2239.  
  2240.         Parameters Returned: None
  2241.  
  2242.         Example:
  2243.              CALL ChangeCTS(No)         ' Turns CTS off
  2244.         
  2245.         See Also: ChangeDTR, ChangeRTS
  2246.   Door Source 4.0B
  2247.   Programmer's Manual - Page 64
  2248.  
  2249.         ChangeDTR
  2250.  
  2251.         Purpose: To raise or lower the DTR
  2252.         
  2253.         Syntax: CALL ChangeDTR(OnOff)
  2254.  
  2255.         Remarks: If you want to drop the carrier on someone, this is one of
  2256.         the best ways to do it. Turning the DTR off normally will cut a person
  2257.         off-line, but not always.
  2258.      
  2259.         Parameters Passed:
  2260.              OnOff - Whether you want the DTR on or off
  2261.                      (1 = Yes(On)  0 = No(Off)
  2262.  
  2263.         Parameters Returned: None
  2264.  
  2265.      
  2266.         Example:
  2267.              CALL ChangeDTR(No)         ' Turns off DTR
  2268.  
  2269.         See Also: ChangeCTS, ChangeRTS
  2270.  
  2271.         
  2272.   Door Source 4.0B
  2273.   Programmer's Manual - Page 65
  2274.  
  2275.         ChangeRTS
  2276.  
  2277.         Purpose: To raise or lower the RTS flag
  2278.  
  2279.         Syntax: CALL ChangeRTS(OnOff)
  2280.  
  2281.         Remarks: The RTS (Request To Send) flag is uesd by most auto-dial
  2282.         modems to see if a computer is ready to recieve data from the modem.
  2283.         If the RTS signal isn't detected, some modems may refuse to accept
  2284.         modem commands or send result codes.
  2285.  
  2286.         Parameters Passed:
  2287.              OnOff - Whether you want the RTS on or off
  2288.                      (1 = Yes(On)  0 = No(Off))
  2289.  
  2290.         Parameters Returned: None
  2291.  
  2292.         Example:
  2293.              CALL ChangeRTS(No)         ' Turns RTS off
  2294.  
  2295.         See Also: ChangeDTR, ChangeCTS
  2296.  
  2297.   Door Source 4.0B
  2298.   Programmer's Manual - Page 66
  2299.  
  2300.         CheckCarrier
  2301.  
  2302.         Purpose: To check if a carrier is present
  2303.  
  2304.         Syntax: CALL CheckCarrier(CarrierPresent)
  2305.  
  2306.         Remarks: This will (as long as Carrier.Check is set to 0) return
  2307.         a Yes (1) or a No (0) in the parameter depending on if the carrier
  2308.         is present. If the global variable Carrier.Check is set to 1, then
  2309.         this routine will return ALWAYS a Yes (1).
  2310.  
  2311.         Parameters Passed: None
  2312.  
  2313.         Parameters Returned:
  2314.              CarrierPresent - Tells if the carrier is present
  2315.                               (1 = Yes  0 = No)
  2316.  
  2317.         Example:
  2318.              CALL CheckCarrier(CarrierPresent)
  2319.              IF CarrierPresent = Yes THEN
  2320.                 CALL Send("You're still connected!", No, Yes, 10)
  2321.              END IF
  2322.            Door Source 4.0B
  2323.   Programmer's Manual - Page 67
  2324.  
  2325.         CheckTimeLeft
  2326.  
  2327.         Purpose: To tell you how many minutes a user has left on the system
  2328.  
  2329.         Syntax: TimeRemaining = CheckTimeLeft
  2330.  
  2331.         Remarks: This function will return the number of minutes that the user
  2332.         currently on has left for this call. Be careful not to assign the
  2333.         value returned to a variable named TimeLeft because doing so will
  2334.         modify Door Source's variable and cause the user's time to go berserk!
  2335.  
  2336.         Parameters Passed: None
  2337.  
  2338.         Parameters Returned:
  2339.                 TimeRemaining - The number of minutes left the user has
  2340.  
  2341.         Example:
  2342.                 CALL Send("("+STR$(CheckTimeLeft)+" min. left )", No, No, 14)
  2343.  
  2344.         See Also: AdjustTimeLimit
  2345.  
  2346.   Door Source 4.0B
  2347.   Programmer's Manual - Page 68
  2348.  
  2349.         ClrScrn
  2350.  
  2351.         Purpose: To clear the local and remote screens
  2352.  
  2353.         Syntax: CALL ClrScrn
  2354.  
  2355.         Remarks: This will effectively clear the screen for both sides
  2356.         using the fastest method that the caller can use. Setting
  2357.         BackGroundColor previous to calling this routine will cause the
  2358.         entire screen to be that color!
  2359.  
  2360.         Parameters Passed: None
  2361.  
  2362.         Parameters Returned: None
  2363.  
  2364.         Example:
  2365.                 CALL ClrScrn
  2366.  
  2367.   Door Source 4.0B
  2368.   Programmer's Manual - Page 69
  2369.  
  2370.         ColorEasy
  2371.  
  2372.         Purpose: To colorize a string and output it
  2373.  
  2374.         Syntax: CALL ColorEasy(Text$, Color.To.Use, Send.Enter)
  2375.  
  2376.         Remarks: If you have a string that you'd like to colorize without
  2377.         having to bother with multiple calls to Send or with @X codes, then
  2378.         use this routine. It will colorize A-Z, a-z, 0-9, and punctuation
  2379.         all in different colors. The Color.To.Use that you specify will
  2380.         affect the output of color over the whole text, experiment with
  2381.         different values to best fit what you need.
  2382.  
  2383.         Parameters Passed:
  2384.                 Text$ - The string to be colorized and displayed
  2385.  
  2386.                 Color.To.Use - This will vary the output for the different
  2387.                                colors used in coloring the text
  2388.  
  2389.                 Send.Enter - Send a CR/LF sequence once displaying is finished
  2390.  
  2391.         Parameters Returned: None
  2392.  
  2393.         Example:
  2394.                 Text$ = "This will be VERY colorful!!"
  2395.                 CALL ColorEasy(Text$, 10, Yes)
  2396.  
  2397.         See Also: BlockSend, RainbowSend, Send, QSend
  2398.  
  2399.   Door Source 4.0B
  2400.   Programmer's Manual - Page 70
  2401.  
  2402.         CommInkey$
  2403.  
  2404.         Purpose: To get a key from just the remote keyboard
  2405.  
  2406.         Syntax: Character$ = CommInkey$ 
  2407.  
  2408.         Remarks: This works just like INKEY$ and CommKeyInkey$, except it
  2409.         will take input ONLY from the com port. If there are no characters
  2410.         waiting to be read, then it will return a null.
  2411.  
  2412.         Parameters Passed: None
  2413.  
  2414.         Parameters Returned:
  2415.              Character$ - The character read from the com port
  2416.  
  2417.         Example:
  2418.              DO
  2419.              LOOP UNTIL (CommInkey$ <> "") OR (INKEY$ <> "")
  2420.  
  2421.         See Also: CommKeyInkey$
  2422.   Door Source 4.0B
  2423.   Programmer's Manual - Page 71
  2424.  
  2425.         CommKeyInkey$
  2426.  
  2427.         Purpose: To get one character from the local or remote keyboard
  2428.  
  2429.         Syntax: Character$ = CommKeyInkey$
  2430.  
  2431.         Remarks: This will check the local keyboard and the com port buffer
  2432.         for keys waiting to be read, if one is found, it will read it and
  2433.         return it, otherwise it will return a null. If you want to wait for
  2434.         a key to be pressed, you should put this routine in a WHILE loop.
  2435.  
  2436.         Parameters Passed: None
  2437.  
  2438.         Parameters Returned:
  2439.                 Character$ - Either null (if no key was pressed local or
  2440.                              remote) or a key from the keyboard or com port
  2441.                              buffer.
  2442.  
  2443.         Example:
  2444.                 DO
  2445.                    Character$ = CommKeyInkey$
  2446.                 LOOP UNTIL Character$ <> ""
  2447.  
  2448.         See Also: Incomm, CommInkey$
  2449.   Door Source 4.0B
  2450.   Programmer's Manual - Page 72
  2451.  
  2452.         CopyAFile
  2453.  
  2454.         Purpose: To quickly copy a file without shelling to DOS
  2455.  
  2456.         Syntax: CALL CopyAFile(Source$, Destination$, ErrCode)
  2457.  
  2458.         Remarks: This will copy a file without the pitfalls of shelling to
  2459.         DOS to do it or of special complex programming. It will return
  2460.         a error code if an error occured.
  2461.  
  2462.         Parameters Passed:
  2463.              Source$ - Drive/Path/Filename of the file to be copied
  2464.  
  2465.              Destination$ - Drive/Path/Filename of the file to be created
  2466.  
  2467.         Parameters Returned:
  2468.              ErrCode - If a error occured during the copy
  2469.                        (1 = Yes  0 = No)
  2470.  
  2471.         Example:
  2472.              Source$ = "MYFILE.TXT"
  2473.              Destination$ = "MYFILE2.TXT"
  2474.              CALL CopyAFile(Source$, Destination$, ErrCode)
  2475.   Door Source 4.0B
  2476.   Programmer's Manual - Page 73
  2477.  
  2478.         DayOfWeek
  2479.  
  2480.         Purpose: To calculate the which day of the week it is
  2481.  
  2482.         Syntax: Day = DayOfWeek
  2483.  
  2484.         Remarks: This routine will return a value from 1 to 7 indicating
  2485.         which day of the week it is. A 1 is Sunday, 2 is Monday, and so on.
  2486.  
  2487.         Parameters Passed: None
  2488.  
  2489.         Parameters Returned:
  2490.                 Day - A number from 1-7 representing the day of the week
  2491.  
  2492.         Example:
  2493.                 IF DayOfWeek = 1 THEN
  2494.                    CALL Send("It's SUNDAY!", No, Yes, 14)
  2495.                 ELSE
  2496.                    CALL Send("It's not sunday!", No, Yes, 10)
  2497.                 END IF
  2498.   Door Source 4.0B
  2499.   Programmer's Manual - Page 74
  2500.  
  2501.         DoorBusy
  2502.  
  2503.         Purpose: To keep a door from being used by two nodes at once
  2504.  
  2505.         Syntax: CALL DoorBusy
  2506.  
  2507.         Remarks: If you aren't going to program multi-node support, call
  2508.         this routine so that multinode systems won't have problems running
  2509.         your door. You have to set the global variable BusyFile$ to the
  2510.         drive/path/filename of a "lockout file" that will be the signal
  2511.         to other nodes that the door is in use. If another node is using your
  2512.         door, then this routine will call DoorBusy and not return control
  2513.         to your program.
  2514.  
  2515.         Parameters Passed: None
  2516.  
  2517.         Parameters Returned: None
  2518.  
  2519.         Example:
  2520.                 BusyFile$ = "MYDOOR.NET"
  2521.                 CALL DoorBusy
  2522.   Door Source 4.0B
  2523.   Programmer's Manual - Page 75
  2524.  
  2525.         EntryIncomm
  2526.  
  2527.         Purpose: To provide a field showing maximum length of input for prompt
  2528.  
  2529.         Syntax: CALL EntryIncomm(Text$, MaxLength, FieldColor, Color.To.Use)
  2530.  
  2531.         Remarks: This is a handy routine to for larger fields (3 characters and
  2532.         larger) that lets the user know what the limit is on the field size by
  2533.         printing above the prompt a (------) field indicator showing the
  2534.         maximum number of characters allowed.
  2535.  
  2536.         Parameters Passed:
  2537.                 Text$ - Prompt to display
  2538.  
  2539.                 MaxLength - Maximum number of characters to allow for input
  2540.                             (Required to be greater than 1)
  2541.  
  2542.                 FieldColor - The color of the (---) field above the prompt
  2543.  
  2544.                 Color.To.Use - The foreground color for the prompt itself
  2545.  
  2546.         Parameters Returned:
  2547.                 ARG$ - The input received
  2548.  
  2549.         Example:
  2550.                 See PRMTDEMO.BAS
  2551.  
  2552.                 Text$ = "Enter your name:"
  2553.                 CALL EntryIncomm(Text$, 20, 10, 11)
  2554.                 ' This would output
  2555.                 '                (--------------------)
  2556.                 ' Enter your name:
  2557.  
  2558.         See Also: PromptIncomm, Incomm
  2559.   Door Source 4.0B
  2560.   Programmer's Manual - Page 76
  2561.  
  2562.         ExtendedCode
  2563.  
  2564.         Purpose: To let you trap F-keys in your own I/O routines
  2565.  
  2566.         Syntax: CALL ExtendedCode(CodeToProcess$, NULL)
  2567.  
  2568.         Remarks: If you are writing your own version of Incomm, and would
  2569.         like to take advantage of Door Source's F-Key processing routines,
  2570.         call this with the key pressed and it will take the necessary
  2571.         action, which may be updating the status bar or shelling to DOS.
  2572.  
  2573.         Parameters Passed:
  2574.                 CodeToProcess$ - The two character code of the key pressed
  2575.  
  2576.                 NULL - This variable shouldn't be used by your routine, it
  2577.                 is only used by Door Source and is specified only to maintain
  2578.                 compatibility.
  2579.  
  2580.         Parameters Returned: None
  2581.  
  2582.         Example:
  2583.                 A$ = INKEY$
  2584.                 IF LEN(A$)>1 THEN               ' Extended code
  2585.                    CALL ExtendedCode(A$, NULL)
  2586.                 END IF
  2587.   Door Source 4.0B
  2588.   Programmer's Manual - Page 77
  2589.  
  2590.         ExitDoor
  2591.  
  2592.         Purpose: To close the com port and update the bbs interface file
  2593.  
  2594.         Syntax: CALL ExitDoor
  2595.  
  2596.         Remarks: Whenever you want to end your door, you MUST call this
  2597.         routine. NEVER let your door simply just come to an end or have the
  2598.         END or SYSTEM command in it. This routine will uphold the DTR and
  2599.         cleanup Door Source's variables, handlers, etc,... It will also
  2600.         update the bbs interface file with the current information. After
  2601.         calling this routine, control will not be returned to your door.
  2602.  
  2603.         Parameters Passed: None
  2604.  
  2605.         Parameters Returned: None
  2606.  
  2607.         Example:
  2608.                 CALL ExitDoor
  2609.  
  2610.  
  2611.   Door Source 4.0B
  2612.   Programmer's Manual - Page 78
  2613.  
  2614.         FileExist
  2615.  
  2616.         Purpose: To detect is a file exists on a disk
  2617.  
  2618.         Syntax: Exists = FileExist(FileName$)
  2619.  
  2620.         Remarks: If you're opening files or preforming something with files
  2621.         you should check, before attempting use, if they exist and not assume
  2622.         that they are there, otherwise your program will generate a error
  2623.         and most likely crash the board it was running on.
  2624.  
  2625.         Parameters Passed:
  2626.                 FileName$ - Drive/Path/Filename to the file to be checked for
  2627.  
  2628.         Parameters Returned:
  2629.                 Exists - If the file exists or not
  2630.                          (-1 = Yes  0 = No)
  2631.  
  2632.         Example:
  2633.                 IF FileExist("MYFILE.FIL") THEN
  2634.                    CALL Send("It exists!", No, Yes, 12)
  2635.                 END IF
  2636.   Door Source 4.0B
  2637.   Programmer's Manual - Page 79
  2638.  
  2639.         FileOpen
  2640.  
  2641.         Purpose: To aid in opening files in a better, easier way
  2642.  
  2643.         Syntax: FileNumber = FileOpen(FileName$, Access$, Sharing, Length)
  2644.  
  2645.         Remarks: When you want to open a file and you don't know what the
  2646.         next available file number is, or you don't want to refer to files
  2647.         by their number, or if you don't want to have to fool with checking
  2648.         if a network is active every time a file is opened, this routine
  2649.         is what you should call. It will find the next available file number
  2650.         and open the file according to your specifications and return the
  2651.         file number to you in a variable so you can use it in place of a
  2652.         number.
  2653.  
  2654.         Parameters Passed:
  2655.                 FileName$ - This is the name of the file to be opened
  2656.                 Access$ - The method in which you want to open the file
  2657.                           for access.
  2658.                                 I - Sequential Input
  2659.                                 O - Sequential Output
  2660.                                 A - Append (Write at end of file)
  2661.                                 R - Random Read/Write
  2662.                                 B - Binary Read/Write
  2663.                 Sharing - Will open files to be shared if specified and a
  2664.                           network is active
  2665.                           (1 = Yes  0 = No)
  2666.                 Length - For random and binary files only, this will open
  2667.                          the file with this as the record length.
  2668.  
  2669.         Parameters Returned:
  2670.                 FileNumber - This is the variable you'd use for I/O with the
  2671.                              file. It will contain a -1 if the file wasn't
  2672.                              found that you tried to open only if you're
  2673.                              trying to do sequential input.
  2674.  
  2675.         Example:
  2676.                 FileNumber = FileOpen("MYFILE.FIL", "O", Yes, 0)
  2677.                 PRINT #FileNumber, "This is in the file"
  2678.                 CLOSE #FileNumber
  2679.  
  2680.                 FileNumber = FileOpen("MYFILE.FIL", "I", Yes, 0)
  2681.                 INPUT #FileNumber, DataFromFile$
  2682.                 CLOSE #FileNumber
  2683.   Door Source 4.0B
  2684.   Programmer's Manual - Page 80
  2685.  
  2686.         GameInfoUpdate
  2687.  
  2688.         Purpose: To write to the 25 line of the game line of the status line
  2689.  
  2690.         Syntax: CALL GameInfoUpdate(Text$, Send.Enter, ColorFore, ColorBack)
  2691.  
  2692.         Remarks: If you want a game status line, you should use this routine
  2693.         to update line 25 (which will be the game status line). It works
  2694.         just like the PRINT command would work with a few differences.
  2695.         The Send.Enter really doesn't advance to the next line, but resets
  2696.         the column pointer (GameInfoCol) to 1. If you want to start printing
  2697.         someplace other than where you are, just set GameInfoCol to the
  2698.         column number. See the Advanced Programming section for a detailed
  2699.         explanation of how this command works.
  2700.  
  2701.         WARNING: You HAVE to use the DSGAME.INT in your main module instead
  2702.         of DOORSORC.INT otherwise this routine will not work!
  2703.  
  2704.         Parameters Passed:
  2705.                 Text$ - String to be displayed on line 25
  2706.  
  2707.                 Send.Enter - Reset GameInfoCol to 1 after displaying
  2708.                              (1 = Yes  0 = No)
  2709.  
  2710.                 ColorFore - Foreground color to use
  2711.  
  2712.                 ColorBack - Background color to use
  2713.  
  2714.         Parameters Returned: None
  2715.  
  2716.         Example:
  2717.                 Text$ = "This is on the game status line!"
  2718.                 CALL GameInfoUpdate(Text$, No, 0, 7)
  2719.   Door Source 4.0B
  2720.   Programmer's Manual - Page 81
  2721.  
  2722.         GetTime
  2723.  
  2724.         Purpose: To separate the time into hours, minutes, and seconds
  2725.  
  2726.         Syntax: CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  2727.  
  2728.         Remarks: This will take the current time and return it to you
  2729.         in a separated form.
  2730.  
  2731.         Parameters Passed: None
  2732.  
  2733.         Parameters Returned:
  2734.                 Hours - The hour
  2735.  
  2736.                 Minutes - The minute
  2737.  
  2738.                 Seconds - The second
  2739.  
  2740.                 SinceMid# - The number of seconds since midnight
  2741.  
  2742.         Example:
  2743.                 CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  2744.                 CALL Send("Its "+STR$(Hours)+" o'clock", No, Yes, 10)
  2745.  
  2746.         See Also: TimeConvert
  2747.  
  2748.  
  2749.   Door Source 4.0B
  2750.   Programmer's Manual - Page 82
  2751.  
  2752.         HighScores
  2753.  
  2754.         Purpose: To make a high score bulletin
  2755.  
  2756.         Syntax: CALL HighScores(Score, HighScoreFile$, OutputNumber)
  2757.  
  2758.         Remarks: This will take the user's score and use the high score data
  2759.         file specified, update the information, and then either display a
  2760.         bulletin or save it to disk. The high score data file, if
  2761.         non-existent will be created, its a random access file and can't
  2762.         be read/modified in a text editor. Compression can be done with the
  2763.         compression utility included with the Door Source archive. You
  2764.         will need to open the file for output before calling this routine
  2765.         if you want to direct the output to a file, this also allows you
  2766.         to create a header (on screen or in the file) for your bulletin.
  2767.         The format of where HighScores places the information is like this:
  2768.  
  2769. <--21 spaces-------->(NAME OF USER)<---29 spaces--->(SCORE)
  2770.                      John Doe                       100
  2771.                      Jane Doe                       50
  2772.  
  2773.         Parameters Passed:
  2774.                 Score - Score for user
  2775.  
  2776.                 HighScoreFile$ - Name of the random access data file
  2777.                                  that HighScores creates
  2778.  
  2779.                 OutputNumber - The filenumber that output should go to, if
  2780.                                0 then output goes to screen
  2781.  
  2782.         Parameters Returned: None
  2783.  
  2784.         Example:
  2785.                 ScoreDataFile$ = "MYSCORE.SCO"
  2786.                 Score = 569
  2787.                 ScoreBlt = 1
  2788.                 OPEN "SCORES.BLT" FOR OUTPUT AS #1
  2789.                 CALL HighScores(Score, ScoreDataFile$, ScoreBlt)
  2790.   Door Source 4.0B
  2791.   Programmer's Manual - Page 83
  2792.  
  2793.         Incomm
  2794.  
  2795.         Purpose: To receive data from the keyboard and com port
  2796.  
  2797.         Syntax: CALL Incomm(Text$, Send.Enter, Max.Characters, Color.To.Use)
  2798.  
  2799.         Remarks: This is the basic input routine, it will check the keyboard
  2800.         and the remote keyboard for input. There are several variables that
  2801.         affect input for this routine, and they are all listed here:
  2802.                 Protected.Input$ - Incomm will show this character in place of
  2803.                                    what is really typed. Setting this to ""
  2804.                                    will cause normal display of input
  2805.  
  2806.                 TabSpace - The string to be displayed will be tabbed to this
  2807.                            column
  2808.  
  2809.                 User.Color - The user's input will be displayed in this color
  2810.  
  2811.                 Caps - Incomm will covert input to all caps before returning
  2812.                        (1 = Yes  0 = No)
  2813.  
  2814.                 No.Enter.Send - After input is completed, a CR/LF won't be
  2815.                                 sent (1 = Yes  0 = No)
  2816.  
  2817.                 EchoKey - Will make input not show up on the screens at all
  2818.                           (1 = Yes  0 = No)
  2819.  
  2820.                 Filter - This will filter out high ascii characters (128+)
  2821.                          (1 = Yes  0 = No)
  2822.  
  2823.                 Table$ - Set this to the only keys you want to be accepted
  2824.                          if you want to limit the user to a few keys. Set it
  2825.                          to Default.Table$ to restore it to normal.
  2826.  
  2827.                 BackGroundColor - This is the background color for the
  2828.                                   prompt and input.
  2829.  
  2830.         Parameters Passed:
  2831.                 Text$ - String to be sent as a prompt
  2832.  
  2833.                 Send.Enter - Send a CR/LF AFTER the prompt and BEFORE input
  2834.                              (1 = Yes  0 = No)
  2835.  
  2836.                 Max.Characters - The maximum number of character to accept
  2837.                                  Setting this to a -1 (or Hockey) will make
  2838.                                  Incomm take the first character it gets and
  2839.                                  not wait for ENTER to be pressed before
  2840.                                  returning.
  2841.                                  (0 = No limit  -1 = Hockey  < 1 = Limit)
  2842.  
  2843.                 Color.To.Use - Foreground color of prompt   Door Source 4.0B
  2844.   Programmer's Manual - Page 84
  2845.  
  2846.         Parameters Returned:
  2847.                 ARG$ - The input received
  2848.  
  2849.         Example:
  2850.                 ' You don't need to reset all of these variables each
  2851.                 ' time you call incomm, they are show here just so you
  2852.                 ' can see how they work.
  2853.                 Caps = Yes                      ' Turn input to all caps
  2854.                 Protected.Input$ = "*"          ' Show * instead of letters
  2855.                 Table$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"  ' Only accept A-Z
  2856.                 Text$="Enter your name:"
  2857.                 CALL Incomm(Text$, No, No, 10)
  2858.                 Protected.Input$ = ""           ' Show what is typed
  2859.                 CALL Incomm(Text$, No, 25, 10)  ' Limit to 25 characters
  2860.  
  2861.         See Also: CommInkey$   Door Source 4.0B
  2862.   Programmer's Manual - Page 85
  2863.  
  2864.         MenuManager
  2865.  
  2866.         Purpose: To make a scroll bar menu
  2867.  
  2868.         Syntax: CALL MenuManager(Menu$(), Center, TextClr, Bars, SlctClr,
  2869.                 BarFore, BarBack, BarSelected)
  2870.  
  2871.         Remarks: This will create a nice selectable menu with a scroll bar
  2872.         for ANSI users to scroll up and down. Non-ANSI users will see the
  2873.         menu, but will be forced to just enter a number and will have no
  2874.         scroll bar. You shouldn't have more than 20 selections on the menu,
  2875.         and all should be numbered. This routine is affected by several
  2876.         variables which are:
  2877.                 Up.Key$ - The key to move the bar up
  2878.                           (Default to +)
  2879.  
  2880.                 Down.Key$ - The key to move the bar down
  2881.                             (Default to -)
  2882.  
  2883.                 ANSI.Select$ - Selection string displayed for ANSI users
  2884.  
  2885.                 NonANSI.Select$ - Selection string displayed for NON-ANSI users
  2886.  
  2887.         Parameters Passed:
  2888.                 Menu$() - An array with all the menu selections in it
  2889.  
  2890.                 Center - Center the selections while displaying
  2891.  
  2892.                 TextClr - Color for selections
  2893.  
  2894.                 Bars - Number of selections in array
  2895.  
  2896.                 SlctClr - Color for ANSI.Select$ or NonANSI.Select$ string
  2897.  
  2898.                 BarFore - Foreground color for scroll bar
  2899.  
  2900.                 BarBack - Background color for scroll bar
  2901.  
  2902.         Parameters Returned:
  2903.                 BarSelected - The bar selected by the user
  2904.  
  2905.         Example:
  2906.                 See MENUDEMO.BAS included with Door Source
  2907.  
  2908.  
  2909.   Door Source 4.0B
  2910.   Programmer's Manual - Page 86
  2911.  
  2912.         MoveCursor
  2913.  
  2914.         Purpose: To position the cursor on the screen
  2915.  
  2916.         Syntax: CALL MoveCursor(X, Y)
  2917.  
  2918.         Remarks: Call this routine to position the cursor anywhere on the
  2919.         screen in the upper 22/23 lines (depending on if there is a game
  2920.         status line). This routine will not move the cursor if the user is
  2921.         not in ANSI mode.
  2922.  
  2923.         Parameters Passed:
  2924.                 X - The row (vertical)
  2925.  
  2926.                 Y - The column (horizontal)
  2927.  
  2928.         Parameters Returned: None
  2929.  
  2930.         Example:
  2931.                 CALL MoveCursor(10, 10)
  2932.  
  2933.  
  2934.   Door Source 4.0B
  2935.   Programmer's Manual - Page 87
  2936.  
  2937.         Parser
  2938.  
  2939.         Purpose: To separate data in a string with a delimiter
  2940.  
  2941.         Syntax: CALL Parser(SearchFor$, SearchIn$, ParArray$(), ErrCode)
  2942.  
  2943.         Remarks: This will take a string and look for the character specified
  2944.         and store the data in the array, it then repeats this process over
  2945.         and over until the end of the string has been reached. This can be
  2946.         handy to store numbers in a compact form for storage in a file.
  2947.  
  2948.         Parameters Passed:
  2949.                 SearchFor$ - The string (delimiter) to search for
  2950.  
  2951.                 SearchIn$ - The string to search in and to parse
  2952.  
  2953.         Parameters Returned:
  2954.                 ParArray$() - Contains the data from SearchIn$ but separated
  2955.  
  2956.                 ErrCode - Will greater than 1 is a error occurred
  2957.  
  2958.         Example:
  2959.                 SearchFor$ = "*"
  2960.                 SearchIn$ = "100*200*300*400*500*"
  2961.                 CALL Parser(SearchFor$, SearchIn$, ParArray$(), ErrCode)
  2962.                 FOR X = 1 TO 5
  2963.                    CALL Send(ParArray$(X), No, Yes, 10)
  2964.                 NEXT
  2965.                 ' This would output:
  2966.                 ' 100
  2967.                 ' 200
  2968.                 ' 300
  2969.                 ' 400
  2970.                 ' 500
  2971.   Door Source 4.0B
  2972.   Programmer's Manual - Page 88
  2973.  
  2974.         NL
  2975.  
  2976.         Purpose: To send the specified number of times a CR/LF sequence
  2977.  
  2978.         Syntax: CALL NL(Number.Of.Times)
  2979.  
  2980.         Remarks: This will send a CR/LF sequence the number of times you
  2981.         tell it to. This is base routine for all routines to advance to
  2982.         the next line.
  2983.  
  2984.         Parameters Passed:
  2985.                 Number.Of.Times - The number of times to display the CR/LF
  2986.                                   sequence.
  2987.  
  2988.         Parameters Returned: None
  2989.  
  2990.         Example:
  2991.                 CALL NL(3)              ' Print 3 CR/LF sequences
  2992.  
  2993.         See Also: Send
  2994.   Door Source 4.0B
  2995.   Programmer's Manual - Page 89
  2996.  
  2997.         PromptIncomm
  2998.  
  2999.         Purpose: To provide a very formatted input field with a prompt
  3000.  
  3001.         Syntax: CALL PromptIncomm(Text$, Default$, DefaultColor, MaxLength,
  3002.                 Color.To.Use)
  3003.  
  3004.         Remarks: This will make a little ( ) area for input to be inside of
  3005.         for ANSI users, non-ANSI users will just have a regular prompt. This
  3006.         routine also allows to easily add a "default" to the prompt.
  3007.  
  3008.         Parameters Passed:
  3009.                 Text$ - Prompt to display
  3010.  
  3011.                 Default$ - "Default" field. Some predefined ones are:
  3012.                            Default1 = (Enter=no)
  3013.                            Default2 = (Enter=none)
  3014.                            Default3 = (Enter=quits)
  3015.  
  3016.                 DefaultColor - Foreground color for default text
  3017.  
  3018.                 MaxLength - Maximum number of characters (Required to be
  3019.                             greater than 0)
  3020.  
  3021.                 Color.To.Use - Foreground color for prompt
  3022.  
  3023.         Parameters Returned:
  3024.                 ARG$ - The input received
  3025.  
  3026.         Example:
  3027.                 See PRMTDEMO.BAS
  3028.  
  3029.                 Text$ = "Enter your name"
  3030.                 CALL PromptIncomm(Text$, Default3, 15, 10, 11)
  3031.                 IF AllTrun$(ARG$) = "" THEN
  3032.                    ' Process default
  3033.                 ELSE
  3034.                    ' Process other
  3035.                 END IF
  3036.                 ' This would output
  3037.                 ' Enter your name (Enter=quits) ? (         )
  3038.                 ' The input would be displayed inside the ( )
  3039.  
  3040.         See Also: EntryIncomm, Incomm
  3041.   Door Source 4.0B
  3042.   Programmer's Manual - Page 90
  3043.  
  3044.         QSend
  3045.  
  3046.         Purpose: To send a string local and remote quickly without the
  3047.         extra bells and whistles of Send.
  3048.  
  3049.         Syntax: CALL QSend(Text$, Send.Enter)
  3050.  
  3051.         Remarks: QSend is a very basic sending routine that simply sends
  3052.         the given string to the local and remote screens. @X and other
  3053.         substitution codes are the only form of color control in the
  3054.         strings passed. Extra variables and parameters that affect Send
  3055.         don't affect QSend.
  3056.  
  3057.         Parameters Passed:
  3058.                 Text$ - The string to be sent
  3059.  
  3060.                 Send.Enter - Send a CR/LF after sending is complete
  3061.                              (1 = Yes  0 = No)
  3062.  
  3063.         Parameters Returned: None
  3064.  
  3065.         Example:
  3066.                 Text$ = "This will be displayed in the last color used."
  3067.                 CALL QSend(Text$, Yes)
  3068.  
  3069.         See Also: BlockSend, ColorEasy, RainbowSend, Send, QSend
  3070.  
  3071.   Door Source 4.0B
  3072.   Programmer's Manual - Page 91
  3073.  
  3074.         RainbowSend
  3075.  
  3076.         Purpose: To display text in a color, rainbow like form
  3077.  
  3078.         Syntax: CALL RainbowSend(Text$, Bell, Enter, Color.To.Use)
  3079.  
  3080.         Remarks: This is a creative way to display text to both displays.
  3081.         It will take the color given to use, and rotate through the colors
  3082.         making a very colorful display. Experiment with different colors
  3083.         to find the most desirable effect.
  3084.  
  3085.         Parameters Passed:
  3086.                 Text$ - Text to be displayed
  3087.  
  3088.                 Bell - Sound the remote speaker, and local is page bell is on
  3089.  
  3090.                 Enter - Send a CR/LF sequence once displaying is done
  3091.  
  3092.                 Color.To.Use - Foreground color to display text in
  3093.  
  3094.         Parameters Returned: None
  3095.  
  3096.         Example:
  3097.                 Text$ = "This will be displayed"
  3098.                 CALL RainbowSend(Text$, No, Yes, 10)
  3099.  
  3100.         See Also: BlockSend, ColorEasy, Send, QSend
  3101.   Door Source 4.0B
  3102.   Programmer's Manual - Page 92
  3103.  
  3104.         RandNum
  3105.  
  3106.         Purpose: To generate a random number within a specified range
  3107.  
  3108.         Syntax: Number = RandNum(Low, High)
  3109.  
  3110.         Remarks: This is handy to generate a random number in the range
  3111.         that you need it. It will generate a completely random number.
  3112.  
  3113.         Parameters Passed:
  3114.                 Low - The lowest number desired
  3115.  
  3116.                 High - The highest number desired
  3117.  
  3118.         Parameters Returned:
  3119.                 Number - The random number generated
  3120.  
  3121.         Example:
  3122.                 CALL Send("The number is "+STR$(RandNum(10,20)), No, Yes, 10)
  3123.  
  3124.  
  3125.   Door Source 4.0B
  3126.   Programmer's Manual - Page 93
  3127.  
  3128.         ReadUsers
  3129.  
  3130.         Purpose: To read from the PCBoard 14.x users file
  3131.  
  3132.         Syntax: CALL ReadUsers(ErrCode)
  3133.  
  3134.         Remarks: This will read the user's record from the PCBoard user file
  3135.         specified in the global variable UserFile$. The data will be read into
  3136.         the global type declaration UserBlock (Which is shown in Appendix D -
  3137.         Variable Reference). For other bbs types, most of the data is loaded
  3138.         directly from the bbs interface file, and calling a routine to read
  3139.         the users file is not necessary. The best way to set UserFile$ is
  3140.         to add on another line to the configuration file and read it in
  3141.         yourself after the first call to ClrScrn.
  3142.  
  3143.         Parameters Passed: None
  3144.  
  3145.         Parameters Returned:
  3146.                 ErrCode - This is the error code is a error occurred
  3147.                           1 - Users file not found
  3148.                           2 - Wrong BBS type
  3149.                           3 - UserFile$ not set to Drive/Path/Filename of users
  3150.                               file
  3151.  
  3152.         Example:
  3153.                 See BLCKDEMO.BAS
  3154.  
  3155.                 ' UserFile$ already set earlier in the program
  3156.                 CALL ReadUsers(ErrCode)
  3157.                 CALL Send("You're from "+STR$(UserBlock.CityState), No,Yes,10)
  3158.  
  3159.         See Also: WriteUsers
  3160.   Door Source 4.0B
  3161.   Programmer's Manual - Page 94
  3162.  
  3163.         Send
  3164.  
  3165.         Purpose: To display a string to local and remote screens
  3166.  
  3167.         Syntax: CALL Send(Text$, Send.Bell, Send.Enter, Color.To.Use)
  3168.  
  3169.         Remarks: This is the basic sending routine and it will display
  3170.         to the local and remote screens. This routine will accept @X codes
  3171.         and other substitution codes and display the proper things in
  3172.         response to it. A few variables affect this routine's output, here's
  3173.         a list:
  3174.                 BackGroundColor - Background color to be used
  3175.  
  3176.                 TabSpace - The text will be tabbed to this column for display
  3177.  
  3178.         Parameters Passed:
  3179.                 Text$ - The string to be displayed
  3180.  
  3181.                 Send.Bell - Will sound the speaker on the remote and will
  3182.                             also sound the local ONLY if the page bell is on.
  3183.                             (1 = Yes  0 = No)
  3184.  
  3185.                 Send.Enter - Send a CR/LF sequence once displaying is done
  3186.                              (1 = Yes  0 = No)
  3187.  
  3188.                 Color.To.Use - Foreground color to display in
  3189.  
  3190.         Parameters Returned: None
  3191.  
  3192.         Example:
  3193.                 Text$ = "This will be displayed!"
  3194.                 CALL Send(Text$, No, Yes, 10)
  3195.  
  3196.         See Also: BlockSend, ColorEasy, RainbowSend, QSend, WindowPrint
  3197.   Door Source 4.0B
  3198.   Programmer's Manual - Page 95
  3199.  
  3200.         ShellToDOS
  3201.  
  3202.         Purpose: To efficiently shell to DOS in order to avoid conflicts
  3203.  
  3204.         Syntax: CALL ShellToDOS(Shell.String$)
  3205.  
  3206.         Remarks: This will let Door Source completely wrap up all of its
  3207.         operations (actually close the com port, but uphold DTR and carrier)
  3208.         so that shelling to a external file transfer program is possible
  3209.         without a conflict of interrupts. This command duplicates what
  3210.         a SHELL command would do in BASIC, but gives Door Source a chance
  3211.         to clean up itself.
  3212.  
  3213.         Parameters Passed:
  3214.                 Shell.String$ - This is the command to be executed once the
  3215.                                 shell is started
  3216.  
  3217.         Parameters Returned: None
  3218.  
  3219.         Example:
  3220.                 Shell.String$ = "DIR >OUTPUT.TXT"
  3221.                 CALL ShellToDOS(Shell.String$)
  3222.   Door Source 4.0B
  3223.   Programmer's Manual - Page 96
  3224.  
  3225.         Sorter
  3226.  
  3227.         Purpose: To sort numbers into descending order
  3228.  
  3229.         Syntax: CALL Sorter(ParArray$(), Number.To.Sort)
  3230.  
  3231.         Remarks: If you need to sort numbers parsed with parser, or other
  3232.         numbers in a STRING array, then call this routine and it will
  3233.         sort it into a descending order.
  3234.  
  3235.         Parameters Passed:
  3236.                 ParArray$() - The array of numbers to be sorted
  3237.  
  3238.                 Number.To.Sort - The number of array elements to sort
  3239.  
  3240.         Parameters Returned:
  3241.                 ParArray$() - The sorted array
  3242.  
  3243.         Example:
  3244.                 ParArray$(1) = "400"
  3245.                 ParArray$(2) = "200"
  3246.                 ParArray$(3) = "600"
  3247.                 CALL Sorter(ParArray$(), 3)
  3248.                 FOR X=1 TO 3
  3249.                    CALL Send(ParArray$(X), No, Yes, 10)
  3250.                 NEXT X
  3251.                 ' Output would be this:
  3252.                 ' 600
  3253.                 ' 400
  3254.                 ' 200
  3255.  
  3256.   Door Source 4.0B
  3257.   Programmer's Manual - Page 97
  3258.  
  3259.         SysopPage
  3260.  
  3261.         Purpose: To page the sysop if the page bell is on
  3262.  
  3263.         Syntax: CALL SysopPage(Answered)
  3264.  
  3265.         Remarks: This routine will check the page bell, and if on, will
  3266.         page the sysop using the paging sounds. If the page wasn't answered
  3267.         or the sysop isn't around then it will return a 0 in the parameter.
  3268.         This routine is affect by several global variables, which are:
  3269.                 PageSound.1 - Sound #1 to be in the "beep" sound of the page
  3270.  
  3271.                 PageSound.2 - Sound #2 to be in the "beep" sound of the page
  3272.  
  3273.                 PageSound.3 - Sound #3 to be in the "beep" sound of the page
  3274.  
  3275.                 Page.String$ - String to show while paging the sysop
  3276.  
  3277.                 Not.Around$ - String to show when the sysop is not around
  3278.  
  3279.         Parameters Passed: None
  3280.  
  3281.         Parameters Returned:
  3282.                 Answered - If the page was answered
  3283.                            (1 = Yes  0 = No)
  3284.  
  3285.         Example:
  3286.                 CALL SysopPage(Answered)
  3287.  
  3288.   Door Source 4.0B
  3289.   Programmer's Manual - Page 98
  3290.  
  3291.         TimeConvert
  3292.  
  3293.         Purpose: To convert from two variables into the HH:MM format
  3294.  
  3295.         Syntax: CALL TimeConvert(Hours, Minutes, NewTime$)
  3296.  
  3297.         Remarks: This will combine hours and minutes into the HH:MM format.
  3298.  
  3299.         Parameters Passed:
  3300.                 Hours - The hour
  3301.  
  3302.                 Minutes - The minute
  3303.  
  3304.         Parameters Returned:
  3305.                 NewTime$ - The hour and minute in HH:MM format
  3306.  
  3307.         Example:
  3308.                 Hours = 10
  3309.                 Minutes = 30
  3310.                 CALL TimeConvert(Hours, Minutes, NewTime$)
  3311.                 CALL Send(NewTime$+" is the next event time.", No, Yes, 10)
  3312.  
  3313.         See Also: GetTime
  3314.  
  3315.  
  3316.   Door Source 4.0B
  3317.   Programmer's Manual - Page 99
  3318.  
  3319.         ViewFile
  3320.  
  3321.         Purpose: To display a file to the local and remote screens
  3322.  
  3323.         Syntax: CALL ViewFile(FileName$, ANSICheck, MorePrompts, ExitPrompt)
  3324.  
  3325.         Remarks: This will display a ANSI or non-ANSI screen to both screens.
  3326.         If you specify to check for a ANSI version of the file, then Door
  3327.         Source will take the filename given, add a G to it, and look for
  3328.         the existence of that file for ANSI users. You can enable more
  3329.         prompts for documentation, or leave them off for long ANSI screens.
  3330.         The exit prompt is a "Press [ANY KEY] to continue" prompt that
  3331.         is display at the end of the file if told to do so. The user can
  3332.         abort the screen at any point by pressing the space bar, CTRL-X, or
  3333.         CTRL-K. If the No.Abort global variable is set to 1 (Yes) then
  3334.         the user can't abort the display. ANSI files should NOT exceed
  3335.         80 characters in length per line.
  3336.  
  3337.         Parameters Passed:
  3338.                 FileName$ - Drive/Path/Filename of file to display
  3339.  
  3340.                 ANSICheck - Check for ANSI version of file for ANSI users
  3341.                             (1 = Yes  0 = No)
  3342.  
  3343.                 MorePrompts - Display more prompts every 23 lines
  3344.                               (1 = Yes  0 = No)
  3345.  
  3346.                 ExitPrompts - Displays a "Press [ANY KEY]" prompt at end of
  3347.                               display (1 = Yes  0 = No)
  3348.  
  3349.         Parameters Returned: None
  3350.  
  3351.         Example:
  3352.                 FileName$ = "MYFILE"
  3353.                 CALL ViewFile(FileName$, Yes, No, Yes)
  3354.                 FileName$ = "MYDOCS.DOC"
  3355.                 CALL ViewFile(FileName$, No, Yes, Yes)
  3356.   Door Source 4.0B
  3357.   Programmer's Manual - Page 100
  3358.  
  3359.         WaitASec
  3360.  
  3361.         Purpose: To delay the program the specified number of seconds
  3362.  
  3363.         Syntax: CALL WaitASec(Number.Of.Seconds)
  3364.  
  3365.         Remarks: Using the SLEEP command, or a FOR loop to delay a program
  3366.         isn't often a good idea in a door because the user could drop carrier.
  3367.         This routine will delay the program correctly for the number of
  3368.         seconds specified and will also keep track of the carrier signal.
  3369.  
  3370.         Parameters Passed:
  3371.                 Number.Of.Seconds - Number of seconds to delay program
  3372.  
  3373.         Parameters Returned: None
  3374.  
  3375.         Example:
  3376.                 CALL WaitASec(5)        ' delay 5 seconds
  3377.  
  3378.   Door Source 4.0B
  3379.   Programmer's Manual - Page 102
  3380.  
  3381.         WindowInput
  3382.  
  3383.         Purpose: To display a prompt and get input from inside a window
  3384.  
  3385.         Syntax: CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  3386.  
  3387.         Remarks: This works just like the Incomm routine, but does the
  3388.         I/O inside of a window created with the Windows routine. The
  3389.         MaxLength should be just right so that input won't overflow the
  3390.         window border and cause problems with erasing it.
  3391.  
  3392.         Parameters Passed:
  3393.                 Text$ - Prompt to be displayed
  3394.  
  3395.                 MaxLength - Maximum number of characters allowed in input
  3396.  
  3397.                 Row - Row to display at (horizontal)
  3398.  
  3399.                 Col - Column to display at (vertical)
  3400.  
  3401.                 Fore - Foreground color to display prompt in
  3402.  
  3403.                 Back - Background color to display prompt in
  3404.  
  3405.         Parameters Returned:
  3406.                 ARG$ - The input received
  3407.  
  3408.         Example:
  3409.                 Text$ = "Enter your name:"
  3410.                 MaxLength = 25: Row = 13: Col = 12
  3411.                 Fore = 15: Back = 1
  3412.                 CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  3413.  
  3414.         See Also: Windows, WindowPrint
  3415.   Door Source 4.0B
  3416.   Programmer's Manual - Page 102
  3417.  
  3418.         WindowPrint
  3419.  
  3420.         Purpose: To display text inside of a window
  3421.  
  3422.         Syntax: CALL WindowPrint(Text$, Row, Col, Fore, Back)
  3423.  
  3424.         Remarks: This is an easy way of displaying text anywhere inside of
  3425.         a window made with the Windows routine. It can also be used for
  3426.         quick short displays that aren't at the current cursor location.
  3427.  
  3428.         Parameters Passed:
  3429.                 Text$ - Text to be displayed
  3430.  
  3431.                 Row - Row to display at (horizontal)
  3432.  
  3433.                 Col - Column to display at (vertical)
  3434.  
  3435.                 Fore - Foreground color to display with
  3436.  
  3437.                 Back - Background color to display with
  3438.  
  3439.         Parameters Returned: None
  3440.  
  3441.         Example:
  3442.                 Text$ = "This will be displayed"
  3443.                 Row = 12: Col = 12: Fore = 15: Back = 1
  3444.                 CALL WindowPrint(Text$, Row, Col, Fore, Back)
  3445.  
  3446.         See Also: Windows, WindowInput
  3447.   Door Source 4.0B
  3448.   Programmer's Manual - Page 103
  3449.  
  3450.         Windows
  3451.  
  3452.         Purpose: To draw window on the local and remote screens
  3453.  
  3454.         Syntax: CALL Windows(ULR, ULC, LRR, LRC, Fore, Back, Border, Shadow)
  3455.  
  3456.         Remarks: This will draw a border enclosed area on the screen, and
  3457.         will even make a shadow if requested. Printing and input is done
  3458.         inside the window with WindowPrint and WindowInput. This is a
  3459.         ANSI only routine, and shouldn't be used with non-ANSI users.
  3460.  
  3461.         Parameters Passed:
  3462.                 ULR - Upper Lefthand row
  3463.  
  3464.                 ULC - Upper Lefthand column
  3465.  
  3466.                 LRR - Lower Righthand row
  3467.  
  3468.                 LRC - Lower Righthand column
  3469.  
  3470.                 Fore - Foreground color to use for border
  3471.  
  3472.                 Back - Background color to use for border and to fill inside
  3473.  
  3474.                 Border - The border number
  3475.                          1 - Single line
  3476.                          2 - Double line
  3477.                          3 - Double horizontal, Single vertical
  3478.                          4 - Single horizontal, Double vertical
  3479.  
  3480.                 Shadow - Makes a shadow on the window
  3481.                          (1 = Yes  0 = No)
  3482.  
  3483.         Parameters Returned: None
  3484.  
  3485.         Example:
  3486.                 ULR = 10: ULC = 10
  3487.                 LRR = 20: LRC = 70
  3488.                 CALL Windows(ULR, ULC, LRR, LRC, 11, 1, 4, Yes)
  3489.  
  3490.         See Also: WindowInput, WindowPrint
  3491.   Door Source 4.0B
  3492.   Programmer's Manual - Page 104
  3493.  
  3494.         WriteUsers
  3495.  
  3496.         Purpose: To write to PCBoard 14.x user file
  3497.  
  3498.         Syntax: CALL WriteUsers(ErrCode)
  3499.  
  3500.         Remarks: This will write the user's record to the PCBoard user file
  3501.         specified in the global variable UserFile$. The data written will be
  3502.         from the global type declaration UserBlock (Which is shown in Appendix
  3503.         D - Variable Reference). For other bbs types, most of the data is
  3504.         written when ExitDoor is called, and calling a routine to write to
  3505.         the users file is not necessary. The best way to set UserFile$ is
  3506.         to add on another line to the configuration file and read it in
  3507.         yourself after the first call to ClrScrn.
  3508.  
  3509.         Parameters Passed: None
  3510.  
  3511.         Parameters Returned:
  3512.                 ErrCode - This is the error code is a error occurred
  3513.                           1 - Users file not found
  3514.                           2 - Wrong BBS type
  3515.                           3 - UserFile$ not set to Drive/Path/Filename of users
  3516.                               file
  3517.  
  3518.         Example:
  3519.                 See BLCKDEMO.BAS
  3520.  
  3521.                 ' UserFile$ already set earlier in the program
  3522.                UserBlock.CityState = "Anytown, USA"
  3523.                CALL ReadUsers(ErrCode)
  3524.  
  3525.         See Also: ReadUsers
  3526.  
  3527.